Animation question in paper 2D

First sorry for my poor English.

I use the UE4 paper 2d game template,and I add an Attack() function.But it doesn’t work well, every time I press the Attack key (J), it just play one fram Attack animation, and then it will play the walkanimation or standanimation iimmediately.

Can someone help me? I want it work just like the normal game .

here’s my code.