What I want to do is basically to make an intermission that will eventually transition into a match that will start depending on the number of players in the game.** I want it so that at least 4 players are in the game for the match to start. I want it to start counting down the check the number of players in the lobby. **
hint = script.Parent
minplayers = 4
function CheckForPlayers()
if game.Players.NumPlayers <= minplayers then
hint.Text = "You need at least "..minplayers.." to start a match."
Countdown()
else
wait (1)
hint.Text = "Starting Match in: 5"
wait(1)
hint.Text = "Starting Match in: 4"
wait(1)
hint.Text = "Starting Match in: 3"
wait(1)
hint.Text = "Starting Match in: 2"
wait(1)
hint.Text = "Starting Match in: 1"
wait(1)
hint.Text = "Starting Match in: 0"
wait(2)
hint.Text = "Starting Match."
wait(1)
hint.Text = "Starting Match.."
wait (1)
hint.Text = "Starting Match..."
wait(1.1)
hint.Text = "Starting Match."
wait(1)
hint.Text = "Starting Match.."
wait (1)
hint.Text = "Starting Match..."
wait(2)
hint.Text = "Starting Match."
wait(1)
hint.Text = "Starting Match.."
wait(1)
hint.Text = "Starting Match..."
wait(1.1)
hint.Text = "Starting Match."
wait(1)
hint.Text = "Starting Match.."
wait (1)
hint.Text = "Starting Match..."
end
end
function Countdown()
local i = 30
while i > -1 do
wait (1)
hint.Text = "Intermission: " .. i
CheckForPlayers()
i = i - 1
end
hint.Parent.Visible = true
end

4 comments
So, what about this code doesn't work?
Nothing works. Nothing Happens and I dont know why..
Do you get any Output?
it says end is expected to close if at line 6