Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

a timed zombie spawner?

Asked by 3 years ago

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!

0
can u send the script from it? i can edit it for you luxkatana 61 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

@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)

Ad

Answer this question