StopAnimation during attack

ehi guys i have a problem,i want to make that when i press right mouse button, pg have to stop the executed animation.
I tried with branch: in the condition i put “if right mouse button pressed” , if true stop animation else do nothing, but my player doesn’t stop, someone can help me?