This script works even when there's only one person, and I want it to only work when there's greater than or equal to 2. I keep adding scripts to do so, but everytime I do, the GUI stops working. Any help please?
local roundLength = 10
local intermissionLength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.Lobby
local GameAreaSpawn = game.Workspace.GameArea
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)

4 comments
Gah! Im so sorry, but I just need a little more time to figure out where to put this. If I put it at the end it breaks the gui, but if I put it at the start, there isn't a "spawn(roundTimer").
Inside the script you posted on line 63 is spawn(roundTimer). This is what tells the function to run, replace that with what I provided
Oh it works! Thank you! It threw me off how the text was just blank, I just tested the game with me and an alt. Do you think instead of repeat, instead it should fire everytime a player leaves/joins? Because once that person leaves, the person alone keeps playing.
Yeah probably, I mainly was just showing you how to do it. Changing it to when they leave/join wont stop the game when its only 1 player however, you would have to code that yourself. Check if players is >2 if not teleport players back to lobby and restart timer or something like that.