local function zombieSpawn(name) local clone = game.ReplicatedStorage.Zombies:FindFirstChild(name):Clone() clone.Parent = game.Workspace.Zombies clone.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.RandomSpawns:GetChildren()[math.random(1,#game.Workspace.RandomSpawns:GetChildren())].Position) end local function forizombie(Times,zombie,cooldown) for i=1,Times do zombieSpawn(zombie) wait(cooldown) end end local function countdown(theseconds,timed) spawn(function() for i=timed,0,-1 do if #game.Workspace.Zombies:GetChildren() == 0 then break end theseconds = i wait(1) end end) end forizombie(1,"Zombie",2) local seconds = 90 coundown(seconds,90)
TRY THIS METHOD FIRST BEFORE TRYING OTHERS: Maybe try using function
but not do local function
that maybe the issue. IF THAT FIX DIDN'T WORK TRY THESE: The other possible issue on line 13 you do spawn (function()
try doing function(spawn)
or function() spawn
or
spawn:Connect(function()