Hi, I'm making a Roblox game where the goal is to survive zombies. I've already coded the round system and now I just need a script to make a timed spawner that limits how many zombies can spawn on a spawner and kills all zombies when the round is over also you will be featured if you give an answer bye!
COMMUNITY QUESTION
a timed zombie spawner?
1 answer
@luxkatana here's the round script it must be inserted in severscriptservice
local roundLength = 300
local intermissionLength = 15
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function()
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
end
else
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 0, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundLength, 0, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: "..i.." seconds left!"
end
end
end
spawn(roundTimer)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
can u send the script from it? i can edit it for you