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

Team divide doesn't work, all players are put on one team when countdown begins?

Asked by 8 years ago
Edited 8 years ago
01maps = game.Lighting.Maps:GetChildren()
02h = Instance.new("Hint", game.Workspace)
03player = game.Players.LocalPlayer
04 
05while true do  
06    if game.Players.NumPlayers > 1 then
07        h.Text = "Deciding What Map To Play"
08        wait(3)
09        ranGame = math.random(1, #maps)
10        mapChosen = maps[ranGame]
11        h.Text = "Map Chosen: " .. mapChosen.Name
12        wait(3)                
13        mapChosenClone = mapChosen:clone()
14        mapChosenClone.Parent = game.Workspace
15-- Above clones maps and runs with map chosen in hint
View all 70 lines...

Issue: All players are put on one team Help would be appreciated!

0
Hey, I'm on mobile and can't help tonight but please fix your code indentation to make it easier to read. AZDev 590 — 8y
0
That better? DesiredRep 75 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I think on line 20 you meant:

1if i % 2 == 0 then

because 1 % 2 will be constant all iterations ._.

0
Thanks for the fix DesiredRep 75 — 8y
Ad

Answer this question