This script sends the players from lobby to the game and to the lobby back and it has a randomizer that is supposed to randomize what kind of tower I will play in, but when I run it I always go to a map in a row and it doesn't change.
local TowerGenerator = math.random(1,2)
local LobbySpawn = game.Workspace.Lobby.Floor.Center.SpawnLocation
local Normal = game.Workspace.Normal.Ground.Teleporter
local MoltenCave = game.Workspace.Molten_Cave.Ground.Teleporter
inRound.Changed:Connect(function()
if inRound.Value == true then
for _, player in pairs(game.Players:GetChildren())do
local char = player.Character
if TowerGenerator == 1 then
char.HumanoidRootPart.CFrame = Normal.CFrame
else
char.HumanoidRootPart.CFrame = MoltenCave.CFrame
end
end
else
for _, player in pairs(game.Players:GetChildren())do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)
P.S: This is just a portion of the script, plus my original question is not getting attention.

4 comments
What do you mean "in a row"?
I mean I keep getting the same map over and over again
just use math.random(1,4)
hmm okay.