Stopping an AnimationTrack

So, For my gun system, I am using the ROBLOX animation editor to create animations. When the gun is equipped, I use the KeyframeReached event to determine when the animation has the desired position, and then AdjustSpeed(0) to freeze the animation in place and stop the animation from resetting. This works, except with client latency, the animation will stop prematurely on the server, resulting in some weird looking stuff. This doesn’t always happen, but it does happen quite frequently depending on latency. The animation technique works fine for the client loading the animations, but for other clients on the server, the animation is suspended halfway through, before reaching the final keyframe.

Is there any way to create an animation that freezes in place without using AdjustSpeed(0) from a KeyframeReached event? I would like to create tool-equipped animations that don’t have to be monitored and stopped via script.

How it appears to other clients


How it appears to the client who loaded the animation (as you can see, the animation system worked properly on the other client as well). This system is just basically unreliable due to latency.

https://developer.roblox.com/en-us/api-reference/function/AnimationTrack/Stop

1 Like

Just call Stop with 0? I dont recommend abusing a glitch but its probably the best way to do this if you dont want to mess with remapping transforms

1 Like