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

Why is this random map chooser not working?

if game.Workspace.GameBegin.Value == "Begin" then

	maps = game.ServerStorage.Maps:GetChildren()
	map = maps[math.random(1, #maps)]
	map:Clone().Parent = game.Workspace

	players = game.Players.GetPlayers()
	different = players[math.random(1, #players)]
	if different.Character then
    	different.MoveTo(map.RedSpawn.Position)
	end

	for _,player in pairs(game.Players:GetPlayers()) do
    	if player.Character and player.Name ~= different.Name then
       		player.Character:MoveTo(blueSpawns[map.BlueSpawn.Position])
		end
    end
end

1 comment

0

Are their any errors?

1 answer

✓ Accepted answer

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

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