Ok so the part for the map spawnpoint (player's spawnpoint) is named as "Spawn", I need help on how to make the players spawn again after a few certain waves.
local roundMsg = game.ReplicatedStorage.Values:WaitForChild("roundMsg")
local zombieCount = game.ReplicatedStorage.Values:WaitForChild("zombiesRemaining")
local zombiesAlive = game.ReplicatedStorage.Values:WaitForChild("zombiesAlive")
local gameInProgress = game.ReplicatedStorage.Values:WaitForChild("gameInProgress")
local wave = game.ReplicatedStorage.Values:WaitForChild("Wave")
local collectionservice = game:GetService("CollectionService")
while true do
for i = 10,0,-1 do
roundMsg.Value = "Intermission: "..i
if i == 1 then
local map = math.random(1,7)
if map == 1 then
game.ReplicatedStorage.Maps.CornFarm:Clone().Parent = workspace.Map
end
if map == 2 then
game.ReplicatedStorage.Maps.Subway:Clone().Parent = workspace.Map
end
for i, v in pairs(workspace.Map:FindFirstChildOfClass("Model"):GetChildren()) do
if v.Name == "Spawner" then
collectionservice:AddTag(v, "Spawner")
end
end
for i, v in pairs(game.Players:GetPlayers()) do
collectionservice:AddTag(v.Character, "Alive")
v.Character.Torso.CFrame = workspace.Map:FindFirstChildOfClass("Model").Spawn.CFrame
end
roundMsg.Value = "Round in Progress"
zombieCount.Value = 6
zombiesAlive.Value = 6
wave.Value = 1
gameInProgress.Value = true
repeat
if #collectionservice:GetTagged("Alive") > 0 then
if zombiesAlive.Value == 0 then
wave.Value = wave.Value + 1
zombieCount.Value = 6 * wave.Value
zombiesAlive.Value = 6 * wave.Value
end
elseif #collectionservice:GetTagged("Alive") == 0 then
gameInProgress.Value = false
end
wait(1)
until gameInProgress.Value == false
workspace.Map:ClearAllChildren()
end
wait(1)
end
end
Alright so here is the main script for my game so far but I'm having trouble on how to make the players spawn again after a few certain waves

3 comments
Alright my good sir, where should I place your written script?
It really just depends on how you prefer to organize your scripts but me personally, I would put it in a script by itself in the ServerScriptService.
Simpletton, my advice is don't copy his script and use it for your own purposes. That will teach you nothing really take a moment to understand what he just said and showed you and attempt it yourself. This site in general is here to help any questions you may have feel free to post.