How do i loop an animation?

I am trying to loop my wave animation, but i can not find anything that seems to work.

I have looked at several tutorials, but i do not know exactly how to script yet (I’m working on it)

I do not have a written code because none of the tutorials work, if someone could tell me exactly what to do and say the new script, that would be great :smiley:

Here is my wave animation ID - 5573263168

Thank you for everyone who reply’s!

When in the animation editor, there should be a little button next to the play button that looks like a circle with an arrow at the end. Click that until it’s highlighted blue, and press play to watch your animation be looped.

If you want to do it through scripting, you can do var.Looped = true.

2 Likes
Animation.Looped = true;
1 Like

Do i make an animation in explorer inside my NPC then put the script inside of it saying

“var.Looped = true.”???

Yeah put the animation you want played in the script, then play the animation. You don’t have to script the animation to be looped, you can just press the little button I talked about.

And replace “var” with the variable name of the Animation.

sorry that i do not know what a variable is :frowning:

can you please say what a variable is???

This is what i am doing,

i probably and very dumb for not realizing what is wrong, so sorry for that.

Yeah. So your “wave” animation needs a variable. Do local wave = script.Wave. Make sure the animation is named “Wave”, and put this before your looped line. I suggest looking at the article I post below on how to animate. Study the code, and look through some more of the DevHub. It has some really useful tutorials on scripting. I would also lookup “AlvinBlox”, as his beginner series is really good. Just keep trying. Coding can be hard at first, but with practice and patience, it’ll get easier. Good luck!

Using Animations in your game

1 Like

Ok Thank you! and also i think your avatar looks really cool!

2 Likes