I have a script for a game that features TDM. Below I have the beginning and part of the end of the entire script. I've shortened it down to where I think is the problem. If needed, below the shortened script is a pastebin link to the entire one. So if anyone can help me do something better or fix what I've done wrong? Thanks.
Problems I'm having: MESSAGE stays stuck at "WAITING FOR PLAYERS". Line 4. No errors in the log.
repeat
print("GameStart!")
game.StarterGui.Msg.MESSAGE.Text = "WAITING FOR PLAYERS"
wait(1)
game.StarterGui.Msg.MESSAGE.Text = "LOADING."
wait(1)
game.StarterGui.Msg.MESSAGE.Text = "LOADING.."
wait(1)
game.StarterGui.Msg.MESSAGE.Text = "LOADING..."
repeat
wait()
until game.Players.NumPlayers > 2
local get = game.Players:GetChildren()
game.StarterGui.Msg.MESSAGE.Text = "SELECTING TEAMS..."
wait(1)
if game.Players.NumPlayers == 2 then
for i = 1,#get do
get[math.random(1, #get / 1)].TeamColor = BrickColor.new("Bright red")
if get[i].TeamColor ~= BrickColor.new("Bright red") then
get[i].TeamColor = BrickColor.new("Bright blue")
else
end
end
-- This is below the entire script and closes off the first repeat
until not game.StarterGui.Msg:findFirstChild("MESSAGE")
Pastebin: SCRIPT

4 comments
you should not be changeing the text in StarterGui you need to go throught game.Player.[player name].playeGui then edit the text
This is a script and not a local script so that wouldn't make sense. The problem is not that since it's working, as I said, but the problem is after that...
You are missing a "until" for the first repeat.
Why don't you just check the number of players when a player enters?