Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How come my teams are not spawning in the leaderboard with players in it?

 while true do
         wait(5)--intermission
     maps = game.ServerStorage.Maps:GetChildren()
     map = maps[math.random(1, #maps)]
     map:Clone().Parent = game.Workspace
     blue = 0
     red = 0
     local teamplay = game.Players:GetChildren()
     for i = 1,game.Players.NumPlayers do
         local ran = math.random(1,game.Players.NumPlayers)
         if blue == red then -- if they are the same it is randomely generated
             br = math.random(1,2)
             if br == 1 then
                 teamplay[ran].TeamColor = BrickColor.new("Bright blue")
             elseif br == 2 then
                 teamplay[ran].TeamColor = BrickColor.new("Bright red")
             end
         elseif red >= blue then
             teamplay[ran].TeamColor = BrickColor.new("Bright red")
          elseif blue >= red then
             teamplay[ran].TeamColor = BrickColor.new("Bright blue")
         end
      end

How come when I enter "Play Solo" none of the teams actually appear onto the leaderboard?

1 comment

0

I figured it out. I did not add any teams that were the color of Bright blue or Bright red.

1 answer

I am a mediocre scripter at best, however I would look to see if you have the teams service inserted into the game. If it is add in the teams and then run the game to see if it works. You could also just add the team service, add the teams, and set auto assign to them. Then make a script for the maps. Just a thought, again new to scripting.

This discussion is preserved as it was. New answers, comments, and votes are closed.