Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make a NPC's Animation loop? I'm having trouble trying to find why.

I'm pretty new to coding, and I wanted to make a fighting game. I have an animation made with Moon Animation (the plugin). I want to loop the animation so I can display animations people will see in the final game. I've found multiple tutorials on how to make the NPC Animation but not have it looped. My animation has a blaster attached to the hand. Is this the reason why?

1 answer

Animations have a Looped property which means that the animation will loop whenever it ends. You can turn that on via scripts.

For more info, read this: https://developer.roblox.com/en-us/api-reference/property/AnimationTrack/Looped

3 comments

0

Thanks! I will try this.

0

Can I loop this code? - wait(3) local hum = script.Parent.Humanoid local anim = hum:LoadAnimation(script.Parent.Animation) anim:Play()

0

if you wanna loop the code you can use While true do but if you wanna make the animation Loop follow Raccoon

This discussion is preserved as it was. New answers, comments, and votes are closed.