I put a then so when the players amount is less than two the game wont start but it doesnt work can somebody look at it?
while true do if game.Players.NumPlayers > 1 then h.Text = "Intermission" wait(1) h.Text = "The game will start soon.." wait(1) for i = 3, 1, -1 do h.Text = "Time left: " .. i wait(1) end h.Text = "Game ended!" wait(3) if RedVal > BlueVal then h.Text = "The winner is TeamRed" aa:Play() wait(1) h.Text = "" end if BlueVal > RedVal then h.Text = "The winner is TeamBlue" aa:Play() wait(1) h.Text = "" end if BlueVal == RedVal then wait(1) h.Text = "Tie! everybody wins!" aa:Play() wait(1) end end end else h.Text = "No enought players!" wait(1) end
You need to remove 2 'end's from above the else, and put one more below and you should be fine.
while true do if game.Players.NumPlayers > 1 then h.Text = "Intermission" wait(1) h.Text = "The game will start soon.." wait(1) for i = 3, 1, -1 do h.Text = "Time left: " .. i wait(1) end h.Text = "Game ended!" wait(3) if RedVal > BlueVal then h.Text = "The winner is TeamRed" aa:Play() wait(1) h.Text = "" end if BlueVal > RedVal then h.Text = "The winner is TeamBlue" aa:Play() wait(1) h.Text = "" end if BlueVal == RedVal then wait(1) h.Text = "Tie! everybody wins!" aa:Play() wait(1) end else h.Text = "No enought players!" wait(1) end end
els has to be before one of the ends. It has to be in the script