Block Attack?

Okay so what I mean is when the character is done playing the animation in this case is the Attack animation, what do I do to make it go back to
the main Animation basically the one that the AI starts of with, to go back to the previous Animation it was playing and to stop playing the
Attack Animation.

So the AI was Running after me and playing the animation it catches to the main character and starts playing the Animation “When its not moving” and when
I move away it stops playing the attack animation and goes back to running and playing idle animation “Patrol”.

“What happens when the AI is not attacking is that the animation just gets stuck when its suppose to be moving or switch back to walk/idle”.

Sorry if I cant explain it AI with me is not the best.