- **What do you want to achieve?
I want my roll animation to play. - **What is the issue?
The roll animation doesn’t play no matter what I do. - **What solutions have you tried so far?
I’ve tried putting it in a local script instead of a module script but to no avail.
It’s just a simple roll script, but the animation doesn’t want to play.
local Movement = {
["Sprint"] = function(Player, Params)
end,
["Dash"] = function(Player, Params, UserInput)
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")
local humanoid = Character:WaitForChild("Humanoid")
local Roll = humanoid:LoadAnimation(script:WaitForChild("Roll"))
Roll.Priority = Enum.AnimationPriority.Movement
local Debounce = false
Debounce = true
Roll:Play()
local bodyVel = Instance.new("BodyVelocity")
bodyVel.MaxForce = Vector3.new(1,0,1) * 30000
bodyVel.Velocity = HRP.CFrame.LookVector * 100
bodyVel.Parent = HRP
for i = 1, 8 do
task.wait(0.1)
bodyVel.Velocity *= 0.7
end
coroutine.wrap(function()
task.wait(2.5)
Roll:Stop()
end)()
bodyVel:Destroy()
Debounce = false
end,
}
return Movement