Need help with keeping an animation constant

Hi. I’m making a weapon but I don’t understand how to keep an animation from not ending.

Heres what it looks like right now:
https://gyazo.com/f84c0f30f61fe1638d277fb229260646
It should be inline with my Button2 up/down (view output)

In my script, I have the animation.Looped = true

1 Like

While your script does work, it wouldn’t be the simplest or most efficient method to do this if by “keep an animation from not ending” you mean keep it from automatically looping.

When you create an animation in the Animation Editor, there’s actually a button that you can use to control whether or not the animation is looped. It’s possible that this button may have been enabled when you created your animation, causing it to automatically loop in-game.

Animation%20Loop%20Button%20Enabled

You should be able to correct this with the following steps:

  1. Import your animation back into the Animation Editor using File > Import from within the editor
  2. Disable the “Toggle Looping Animation“ button found next the “Move Scrubber to End” button
  3. Export your animation to the same animation file by using File > Export and then selecting the same animation in the export window

You can find more information on looped animations in the following Developer Hub Article: Using the Animation Editor

2 Likes

Wouldn’t I want it to be looped so that it plays until I :Stop() it?

1 Like

If I understand you correctly, I don’t believe so. By setting the animation to not loop, stopping it manually using Stop() wouldn’t even be necessary because the animation would stop by itself after one complete cycle.

When implemented, this would mean that the Play() function would play the animation once per mouse click, ending it automatically at the end of each cycle.