So I know this is probably a bit much but I was very confused, how would I detect the value of how many players are in a team, and then use said value in the script?
local roundLength = 600
local interLeagnth = 35
local inRound = game.ReplicatedStorage:WaitForChild("InRound")
local Status = game.ReplicatedStorage:WaitForChild("Status")
local lobbySpawn = game.Workspace.Lobby.LobbySpawns.Spawns.SpawnLocation
local gameSpawn = game.Workspace.Forest.GameSpawn
inRound.Changed:Connect(function()
if inRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = gameSpawn.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 = interLeagnth, 1, -1 do
inRound.Value = false
wait(1)
Status.Value = "Intermission ".. i .." seconds left!"
end
for i = roundLength, 1, -1 do
inRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
print("Clone tools here")
end
end
end
spawn(roundTimer)