While loop issue(solved)

I’m trying to get a while loop to clone a bunch of enemies, however each time I try, it completely crashes. I would use a for loop but I really don’t know how to here.

The while loop shouldn’t be running infinitely so it shouldn’t be causing a crash to my knowledge.
Not sure what the issue is.

I can clone the units manually so I do know it isnt the clones themselves that are the issue. Screenshot 2026-01-07 8.23.27 AM

your trigger to exit the while loop (setting summoning to false) looks to be outside of the while loop itself, so you get stuck in an infinite loop.

see what happens if you put that last if statement inside of the loop - i think that fixes the loop part.

1 Like

Yeah, that completely fixed it. Thanks for the help.