I'm making a round system in Roblox studio
local status = game:GetService("ReplicatedStorage"):FindFirstChild("Status") local maps = game.Workspace.Maps:GetChildren()
while true do local interTime = 5 --Intermission Time local roundTime = 10
while true do --intermission loop
status.Value = "Intermission "..interTime
interTime = interTime - 1
wait(1)
if interTime <= 0 then
break
end
end
status.Value = "Round Starting.."
local chosenMapNumber = math.random(1,#maps)--picks a random map
local chosenMap = maps[chosenMapNumber]
local tp = chosenMap.Tp
for i, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = tp.CFrame--teleports all players to the selected map
end
while true do --round loop
status.Value = "Round "..roundTime
roundTime = roundTime - 1
wait(1)
if roundTime <= 0 then
break
end
end
for i, player in pairs(game.Players:GetChildren()) do
player:LoadCharacter()
end
end
what would I add to this so the round would end early if one of the teams reaches a certain amount of cash in the team leaderstats
