I'm using a looping animation I made in animation editor
workspace.Player1.Humanoid:LoadAnimation(workspace.LobsterAnim):Play()
But when I try to stop it
workspace.Player1.Humanoid:LoadAnimation(workspace.LobsterAnim):Stop()
It keeps playing. I tried deleting the animation also and it still keeps playing.
How do I make it stop?
Every time you call LoadAnimation
a new AnimationTrack is created. When you try to stop the animation, you call LoadAnimation
a second time. This creates a new AnimationTrack separate from the one that's actually playing! Therefore, when you stop it, nothing happens.
Store a single AnimationTrack in a variable, then play it and stop it as you wish. In pseudo code it would look like this:
local animTrack = Humanoid:LoadAnimation(animation) animTrack:Play() wait(1) animTrack:Stop()