Attack animation replays if interrupted

132723-giphy.gif

So the issue I’m running into is that if the character attacks and then you move immediately after, the attack animation replays. I tried to capture a good picture of it above. The Loop Time is unchecked and there is no exit time. I can only imagine it has to do with my code perhaps? This is what the code looks like for the attack.

void Attack1()
{
playerAnim.SetBool(“isAttacking1”, true);
Attack();
}

After this method is called, I have a key event on the animation itself that calls this method:
void Attack2()

{

    playerAnim.SetBool("isAttacking1", false);

    playerAnim.SetBool("isAttacking2", true);

    Attack();

}

This is used to end the combo if no action is taken or continue if the correct key is pressed. I’ve tried using Triggers but they’re making the animation play too quickly. Hopefully someone can help me out with this.

You could just block the player’s input while the animation plays.