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
14 until game.Players.NumPlayers > 2 15
16 local get = game.Players:GetChildren() 17 game.StarterGui.Msg.MESSAGE.Text = "SELECTING TEAMS..." 18 wait(1) 19 if game.Players.NumPlayers == 2 then
In lne 14 you said >2 players, Then in 19 you said Equal to 2 players, It would be >= or just >.