Hey there,
I have a game and want to clone a zombie model a certain amount of times
However, the model only clones 2 times, here is my main module:
function f()
game.ServerStorage.Zombie:Clone().Parent = workspace
end
function spawnZombies()
deleteZombies()
local zombieModel = game.ServerStorage.Zombie
if _G.zombie == nil or 0 then
for i = 0,1 do
zombieModel:Clone().Parent = workspace
end
wave += 1
else
local count = 0
repeat wait()
count += 1
f()
until count == wave
wave +=1
end
print(wave)
while wait(2) do
for i,v in pairs(workspace:GetChildren()) do
if workspace:FindFirstChild("Zombie") then
continue
else
spawnZombies()
break
end
end
end
end