Stopping a player's main animations?

I’m making a tool that a button is held down an attack charges. During the charging the player’s walk and idle animations get swapped out with different ones. The problem is if you change an animation that’s playing it wont start playing the animation it got changed, so you have to make it stop only for it to start playing the new animation.

I’ve tried stopping tracks returned by GetPlayingAnimationTracks, but it doesn’t work. Turning the player’s walk speed to 0 for a very split second works but after a while it starts to break.

Is there any other way to stop a player’s main animations?

1 Like

I’m not sure is animation priority related to your case?

No animation priority doesn’t matter in this case

Are you directly changing their walk animation, or are you loading an animation onto the humanoid?

Im directly changing the animation id for the respected animation under the animate script

That’s not a sensible/good approach in any way. Just load the animation on the humanoid and play it.

1 Like

But then how would you make it so when your character starts or stops walking, your custom animation plays?