So Iām making a little game, and I tried to make a script where zombies are cloned every so often.
local ServerS = game:GetService("ServerStorage")
local zombieServer = ServerS.Zombie
while true do
zombieServer:Clone()
zombieServer.Parent = game.Workspace
wait(2)
end
However, only one zombie is spawned. Any solutions?
Thanks for everything
local ServerS = game:GetService("ServerStorage")
local zombieServer = ServerS.Zombie
while true do
local clone = zombieServer:Clone()
clone.Parent = game.Workspace
task.wait(2) -- use task.wait() instead of wait()
end