Okay so what you have laid out is spawning players on a random map. Maybe make an intermission period. This will be really basic.
03 | maps = game.ServerStorage.Maps:GetChildren() |
04 | map = maps [ math.random( 1 , #maps) ] |
05 | map:Clone().Parent = game.Workspace |
07 | for _,player in pairs (game.Players:GetPlayers()) do |
08 | if player.Character then |
09 | spawns = map.Spawns:GetChildren() |
10 | player.Character:MoveTo(spawns [ math.random( 1 , #spawns) ] .Position) |
14 | for i,player in pairs (game.Players:GetPlayers()) do |
15 | if player.Character then |
16 | player.Character.Head:remove() |
that is a basic game script but you mentioned teams correct?
03 | maps = game.ServerStorage.Maps:GetChildren() |
04 | map = maps [ math.random( 1 , #maps) ] |
05 | map:Clone().Parent = game.Workspace |
08 | local teamplay = game.Players.GetChildren() |
09 | for i = 1 ,game.Players.NumPlayers do |
10 | local ran = math.random( 1 ,game.Players.NumPlayers) |
14 | teamplay [ ran ] .TeamColor = BrickColor.new( "Bright blue" ) |
16 | teamplay [ ran ] .TeamColor = BrickColor.new( "Bright red" ) |
18 | elseif red > = blue then |
19 | teamplay [ ran ] .TeamColor = BrickColor.new( "Bright red" ) |
20 | elseif blue > = red then |
21 | teamplay [ ran ] .TeamColor = BrickColor.new( "Bright blue" ) |
24 | for _,player in pairs (game.Players:GetPlayers()) do |
25 | if player.Character then |
26 | spawns = map.Spawns:GetChildren() |
27 | player.Character:MoveTo(spawns [ math.random( 1 , #spawns) ] .Position) |
31 | for i,player in pairs (game.Players:GetPlayers()) do |
32 | if player.Character then |
33 | player.Character.Head:remove() |
34 | player.TeamColor = BrickColor.new( "White" ) |
Just create 3 teams. One Bright blue, One Bright red, and another White. Spawns are still random but if you want to create seperate spawns, I'm sure you can do it (;