Play animation when button pressed

I have animation imported in ue4 (walking) all I’m trying to do is I want the animation to only play when I press the joystick up and then stop when I let go.