How do I make it so that the animation plays once per click?

Currently the animation only plays if you hold the button and it keeps looping. How do I make it so that you only have to click once and the animation will play once?