Infinite Loop Detected, works fine as a standalone

Im currently trying to make the punch animation of my character play on loop until they let go of the mouse. It seems to work fine when I run as a standalone, but in the editor as soon as I click it stops the game and gives the the error “infinite loop detected”. I’m new to UE4 so sorry if this is easy/stupid , I just can’t seem to figure out what’s wrong.

anybody know?

This is a very strange way to loop something, inefficient and unsafe.

Consider using Set Timer by Event for this instead. While loop is not a good idea in this case.

Try it like this:

Thanks, I hadn’t learned about set timer by event yet. I managed to get it to work for the most part , but now the animation ends as soon as I let go of the mouse. Is there a way to wait until the animation finishes? I tried using a delay the length of the animation, but the problem with that is that if i let go of the mouse halfway through the animation, the character just freezes at the end of the animation for the remainder of the delay.