How to make animation play once

I created a very simple animation of a thumb going from down to up. I want it to stop at the end of the tween but can’t seem to get that to happen. I clicked on the last frame and put on “play once” but it continues to loop. Need this for a class I’m teaching tomorrow if anyone can help. Thanks!

1 Like

i’m not sure what you mean by “play once”, in the editor, the animation should always loop. when exported, it should only play once. if you want the animation to stop in the editor, click the last frame, and in the inspector, you should see some scripts, and there should be one called “default”. click in that, and you will get a code menu. type stop(); in the code, which means the animation will stop when that frame is visited.

1 Like

go to last frame and go in the edtor go to timeline scripts click stop go to see what number the last frame is on and tipe the number

:tada: Hi @Isubella, welcome to the forums!

You can add this code into the update script of the frame with the tween:

if(project.currentFrameNumber=== 5)
 stop();

Replace the number, 5, with the frame number you want the tween to stop at.

The solutions mentioned above should also work :+1:
If you’re still facing any issues, I can create an example file to help.


When the object is highlighted, there is a small drop down box that has some options. (Not surprising most people haven’t seen it)

1 Like

Hi Thanks for your response. I clicked on “play once” and it didn’t do that??? hmmm.

Can you share the wick file?

Can you share the project because I’ve tried to plop it in my project, and it didn’t work…

this is a very old post–don’t bump it!

Ah my bad… I didn’t even realize I’m kind of new.