Animation not playing

Hello fellow devs!

I’m working on a custom starterCharacter Rig and I made a walk animation for it. Whenever I try the walk animation it doesn’t play at all. All the parts are unanchored, Animationpriority is set to action, and no errors are shown.

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid.Animator:LoadAnimation(walkAnim)

humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimTrack.IsPlaying then
			walkAnimTrack:Play()
		end
	else
		if walkAnimTrack.IsPlaying then
			walkAnimTrack:Stop()
		end
	end
end)


image


Thanks for reading!

If I’m not mistaken, the animate script must be inside StarterCharacterScripts. Otherwise it might get destroyed

1 Like

Thanks worked. Ty for the help

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