I'm trying to run an intermission if there are >= 2 players in the game. I have this code, but it's giving no errors, and it looks perfectly fine in my opinion. Here is the code.
local ControlBoard = workspace:WaitForChild("ControlBoard").Holder.Mode
local Sword = game.ReplicatedStorage:WaitForChild("Sword")
local Maps = game.ReplicatedStorage:WaitForChild("Maps")
local IntermissionTime = 10
local RequiredPlayers = 2
local GameRunning = false
local GameTime = 60
local function Game()
if GameRunning == false then
GameRunning = true
local function RunIntermission()
for i = IntermissionTime, 0, -1 do
ControlBoard.Text = "Intermission: " .. i
wait(1)
end
RunIntermission()
end
end
end
while wait() do
if game.Players.NumPlayers >= RequiredPlayers then
Game()
end
end
