How to repaet an action

While Loops are dangerous to use.It can cause unexpected crushes.Try using “Do N” node.

But in this case,I suggest using a more complicated “A.I” with behaviour trees.There are lots of tutorials on this.Try searching “Basic A.I For UE4”.