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

Why is this random map chooser not working?

Asked by 11 years ago
01if game.Workspace.GameBegin.Value == "Begin" then
02 
03    maps = game.ServerStorage.Maps:GetChildren()
04    map = maps[math.random(1, #maps)]
05    map:Clone().Parent = game.Workspace
06 
07    players = game.Players.GetPlayers()
08    different = players[math.random(1, #players)]
09    if different.Character then
10        different.MoveTo(map.RedSpawn.Position)
11    end
12 
13    for _,player in pairs(game.Players:GetPlayers()) do
14        if player.Character and player.Name ~= different.Name then
15            player.Character:MoveTo(blueSpawns[map.BlueSpawn.Position])
16        end
17    end
18end
0
Are their any errors? User#3 0 — 11y

1 answer

Log in to vote
0
Answered by 11 years ago

It doesn't look as if blueSpawns was ever defined, unless this is not your entire code.

Ad

Answer this question