Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by
Raccoonyz 1092 Donator Moderation Voter
4 years ago

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

0
Thanks! I will try this. Xhaloshor 0 — 4y
0
Can I loop this code? - wait(3) local hum = script.Parent.Humanoid local anim = hum:LoadAnimation(script.Parent.Animation) anim:Play() Xhaloshor 0 — 4y
0
if you wanna loop the code you can use While true do but if you wanna make the animation Loop follow Raccoon MachoMasterKirby 2 — 4y
Ad

Answer this question