Roll animation doesn't want to play

  1. **What do you want to achieve?
    I want my roll animation to play.
  2. **What is the issue?
    The roll animation doesn’t play no matter what I do.
  3. **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

2 Likes

Maybe try setting the AnimationPriority to Action or higher? The default run animation might be playing over the roll animation.

EDIT: i just noticed you were using humanoid:LoadAnimation(), use humanoid.Animator:LoadAnimation() instead because humanoid:LoadAnimation() is deprecated.

2 Likes

It didn’t work. Btw both humanoid:LoadAnimation() and humanoid.Animator:LoadAnimation() accomplish the same thing.

I have gotten a new roll animation and it fixed it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.