Animation plays when using Run, but not when playing

Recently, I made a simple animation in Moon Animator as an idle animation for one of my npcs.

I thought it was working fine, as when I ran it I could see the animation and it looked normal. However, when I playtested the game later the animation wasn’t playing, and there was nothing in the output to indicate something was wrong.
To see if my script was the issue I substituted the animation for a roblox default animation and when I did that it worked fine. Does anyone know why this is/have a solution for it? I was thinking maybe the animation needed to be verified before it loaded but I uploaded it about 7 hours ago and I thought that would be enough time. Do I need to wait longer?

This is the code that plays the animation Screenshot 2022-07-25 223815

Is the animation priority high enough?

https://developer.roblox.com/en-us/api-reference/property/AnimationTrack/Priority

idle.Priority = Enum.AnimationPriority.Core

I think that’s the required one, if not try action.

Thanks for the reply!

I tried this and actually Action is the highest priority, with Action4 being the top priority.
So I set the anim priority to Action4 and it played for a split second when I loaded in, but then stopped immediately after. Nothing in the output either, which just raises more questions.

That’s funky. Maybe try just forking the default Animation script and modifying the animations?

I just use an Animate script from a cheap Jeff The Killer free model, it checks if your WalkSpeed’s over 17 and then plays the run animation.

Sort of late follow-up to this post, this is actually a known bug that has been around for years.

With a little bit more digging, I found this post from 2019 describing a similar issue to the one I was having.

Essentially, if you set the looped property of an animation from a script it just won’t loop. It should, but it doesn’t, and it doesn’t seem like they’re planning on fixing it any time soon. The solution for this is to import any animation made with an external plugin into the built in Roblox animation editor, and toggling the looping button from there. For anyone in the future who suffers this problem may God have mercy on your soul, because this haunted me for days.

2 Likes