Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Yeevivor4 155
10 years ago
 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?

0
I figured it out. I did not add any teams that were the color of Bright blue or Bright red. Yeevivor4 155 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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.

Ad

Answer this question