Animation not playing [HELP]

So I had been trying to play an animation for a couple of minutes now and it just ain’t working. I know for a fact that the code executes that part, for the print statements work flawlessly.

Also, I own the animations, and they r in this form "rbxassetid://ID"

	local humanoid : Humanoid = self.Player.Character:FindFirstChild("Humanoid")
	local animator : Animator = humanoid:FindFirstChildOfClass("Animator")
	
	local animation = Instance.new("Animation")
	animation.AnimationId = animationID
	
	print(animation, animationID)
	
	local animationTrack : AnimationTrack = animator:LoadAnimation(animation)
	
	animationTrack:Play()
	
	self.Janitor:Add(animationTrack.Stopped:Connect(function()
		self:SetState("Idle")
	end))

Also when I was debugging I found out that, Janitor fires stopped really quick, like 0.4 secs, so I checked the length of the track and would u look at that? 0.4 seconds. I don’t know if that’s necessary time period for an animation to run, if not pls lmk.

Where is this script located? Is It on a local script?

Neither, i’m using modulescripts, and the script runs fine,only the animation doesn’t play.

Try using It on a local player script to test, If It Works play the animations from the server script Service to make the animation appear to all the players

I told u, the animation runs just fine, however i will try your input. Will update u if it works.

1 Like

Nope still not workin char limit

Turned out that I was being an idiot, trying to load r6 animations on r15.

Oh lol, hope its ok now, good work m8