Hi there I am GODPOTATO
So, at first, I want to make trail to humanoidrootpart but the trail will appear to the different positon.
My sicript is
local remoteEvents = game.ReplicatedStorage.RemoteEvents.Skills
local Effects = game.ReplicatedStorage.Effects
remoteEvents.Dash.OnServerEvent:Connect(function(player)
local char = player.Character
local trail = Instance.new("Trail")
trail.Color = ColorSequence.new(Color3.new(0.952941, 1, 0))
trail.Parent = char.UpperTorso
local Attach1 = Instance.new("Attachment")
local Attach2 = Instance.new("Attachment")
Attach1.Name = "Attach1"
Attach1.Parent = char.UpperTorso
Attach1.Position = char.HumanoidRootPart.Position
Attach2.Name = "Attach2"
Attach2.Parent = char.UpperTorso
Attach2.Position = char.HumanoidRootPart.Position + Vector3.new(0,2,0)
trail.Attachment0 = Attach1
trail.Attachment1 = Attach2
wait(3)
trail:Destroy()
Attach1:Destroy()
Attach2:Destroy()
end)
Some one please solve this.
In addtion, this is local script
local Button = script.Parent
local player = game.Players.LocalPlayer
local remoteEvent = game.ReplicatedStorage.RemoteEvents.Skills
local Key = game:GetService("UserInputService")
Key.InputBegan:Connect(function(KeyCode)
if KeyCode.KeyCode == Enum.KeyCode.E then
if script.Parent.Parent.CoolDown.Value == 0 then
remoteEvent.Dash:FireServer(player)
local Sound = script.Parent.Parent.Wind
local Character = player.Character
local Humanoid = Character:FindFirstChild("Humanoid")
script.Parent.Parent.CoolDown.Value = 15
Humanoid.WalkSpeed = Humanoid.WalkSpeed * 1.5
Sound:Play()
wait(3)
Sound:Stop()
Humanoid.WalkSpeed = Humanoid.WalkSpeed / 1.5
end
end
end)