Hi, I have a round based game that teleports you once the intermission is over. I am very beginner at scripting, so I do not understand some of this. I want to make it so if everyone dies then the script goes back to intermission.
Here is the code I have right now:
local status = game.ReplicatedStorage:WaitForChild("Status")
while true do
status.Value = "Intermission (10)"
wait(1)
status.Value = "Intermission (9)"
wait(1)
status.Value = "Intermission (8)"
wait(1)
status.Value = "Intermission (7)"
wait(1)
status.Value = "Intermission (6)"
wait(1)
status.Value = "Intermission (5)"
wait(1)
status.Value = "Intermission (4)"
wait(1)
status.Value = "Intermission (3)"
wait(1)
status.Value = "Intermission (2)"
wait(1)
status.Value = "Intermission (1)"
wait(1)
target = CFrame.new(-131.76, 18.66, -120.07) --could be near a brick or in a new area
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Head.CFrame = target + Vector3.new(0, i * 5, 0)
--add an offset of 5 for each character
end
function setTeam(player, teamName)
player.TeamColor = game.Teams[teamName].TeamColor
if player.Character then --Just in case the character doesn't exist for some reason
end
end
for _, player in pairs(game.Players:GetPlayers()) do
setTeam(player, "Playing")
end
status.Value = "Round in progress..."
wait(200)
status.Value = "Time is up!"
wait(4)
end
It would be greatly appreciated if you helped me. Thanks!

4 comments
I don't really understand...
why wouldn’t they learn from alvin blox
alvin blox is good duh, why wouldn't he learn from him?
He just feeds you with scripts without telling you what the script does, when I was a beginner I used to watch him and he learnt me a bad habit, I just copied his scripts.