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

How do I run an animation on any given humanoid?

Asked by 5 years ago

```lua anim = script.Parent.Parent.Parent.Humanoid:LoadAnimation(script.Parent)

while true do anim:Play() wait(3) end ```

So far, this is the code I came up with. Theoretically, this should run an animation, wait 1 second (the anim is 2 seconds), then loop, but doesn't run anything. Putting a print() statement in the loop prints, but the anim doesn't play.

1 answer

Log in to vote
0
Answered by 5 years ago

You can simply add looping animation in studio when creating an animation. !
https://gyazo.com/8ccc3691861c3916858e2e14c28ffdf5

Now you don't have to use the while true do loop and you can simply stop the animation with :Stop()

Hope this helped you!

Good luck!

Waterfox

Ad

Answer this question