Ok, so I am trying to make a zombie spawn thing for my game. A zombie fighting game, who would have figured? Anyways, an error appears when I run the game:
Script timeout: exhausted allowed execution time
I don't know what this means to I researched it. I know what It means but i don't know how to fix it. I also searched that up (P.S. I am using a repeat loop) and I just need to add a wait() https://scriptinghelpers.org/questions/76821/t? so I did:
repeat wait()
Still doesn't work, and I am stumped, heres the code:
local norm = game.ReplicatedStorage.Zombie
local locONE = workspace.spawnlocations.locONE
local locTWO = workspace.spawnlocations.locTWO
local locTHREE = workspace.spawnlocations.locTHREE
repeat wait()
local clone = norm:Clone()
clone.Parent = workspace.workzombie
clone.UpperTorso.CFrame = locONE.CFrame
workspace.wave.Value = workspace.wave.Value + 1
until workspace.wave.Value == 50000
Here is a Youtube video of this problem:
LEE lol, anyways thanks for the help!

2 comments
try putting a numerical value into the wait() like 1? because without a numerical value, it will repeat rapid fire, too fast for the game to handle?
still same problem, but thanks!