Does anyone know how to stop a animation in a script?

Does anyone know how to stop a animation in a script?

AnimationTrack:Stop()

Just how you would play it.

For some reason when I put that it doesn’t work

You need to specify the AnimationTrack yourself.

1 Like

By doing

local animTrack = character:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(animationInstance)
animTrack:Play()

--some other area of the script

animTrack:Stop()

Note that if you can, play animations from the client. If you’re playing it from the server though, ask if they have a humanoid and an animator in their humanoid, since exploiters can delete this stuff and flood your console with errors. It’s fine if they’re flooding their console/output though since that stuff is stored on their end.