Hi I'm writing this game which requires animations for the npcs. I have stuff where I want the animation to loop forever. I'm not sure why but it only plays once and then stops. If I run it (not like with player. just running it) it works fine. I have a local and non local script that are duplicates and it doesn't do anything.
Code:
local Humanoid = script.Parent:WaitForChild("Humanoid") local animationTrack = Humanoid:LoadAnimation(script.NPCIdle) -- The animation is in the script animationTrack.Looped = true animationTrack:Play()
I'm having the same problem for my idle animation in my NPC and haven't completely fixed it, but I know that the problem has to do with the animation itself. Try to export the animation without the loop being toggled in the animation editor, that MIGHT work. Also, check to see if you have more than one of the same part in the same position, I found something like that in my NPC that isn't working. When I removed that extra part, I think it helped with the looping for one of my other animations.