--{SERVICES}--
local players = game:GetService("Players")
--{SETTINGS}--
local intermissionLength = 10
local gameLength = 90
local captainTeamSelection = 10
local captainPlayerSelection = 5
local gameStatus = game.ReplicatedStorage.gameStatus
local inRoundStatus = game.ReplicatedStorage.inRoundStatus
local function playerCounter()
while #players:GetPlayers() <= 2 do
players.PlayerAdded:Wait()
inRoundStatus = false
tick()
gameStatus.Value = "Waiting for Players..."..#players:GetPlayers().."/2"
end
end
local function intermissionTimer()
while true do
for i = intermissionLength, 1, -1 do
print ("I am running!")
inRoundStatus.Value = false
tick()
gameStatus.Value = "Intermission:"..i.." seconds left!"
end
end
end
spawn (playerCounter)
spawn (intermissionTimer)
I am attempting to make the game wait for players to be counted and then run the intermissionTimer, however once #players:GetPlayers() <= 2, it stays at 2/2 instead of running the intermissionTimer. I am relatively confused as to why…