Stop my character from getting stuck in the last animation

So my game has a combo system where if i press square thrice the player is supposed to play three attack animations.

Now first attack plays well but when i press the square button a second time, animation 2 plays as well and then it transitions into animation 3 without any input and my character gets stuck in the last frame of the thid animation.

Heres my code

Attack events



Attack end events