This means you have other animation that you allowed to play at the same time and they fight for the right to be played
Imagine this you have idle animation when player is not moving
Now you make event that when Z key is pressed then play attack animation
Now which animation should play when you are not moving and pressing Z?
For engine both should play
Unless you add to idle animation
Z key is not pressed
You cannot just allow animations to play when you want to but also need to restrict them from playing when you don’t want them to play