how do i make this script spawn where i want them?
these are the scripts i have tried. it doesnt spawn on the first spawn. it spawns on the second spawn. i have 5 red spawns and 5 blue spawns
what im trying to do is make one person spawn on red, then second person on blue and third on red, and so on. please help!
01 | game.Players.PlayerAdded:connect( function (player) |
05 | if game.Teams [ "Blue Team" ] .Number.Value < = game.Teams [ "Red Team" ] .Number.Value then |
06 | player.TeamColor = BrickColor.new ( "Really red" ) |
08 | if game.Workspace.Red.Red 1. Used = = false then |
15 | game.Teams [ "Red Team" ] .Number.Value = game.Teams [ "Red Team" ] .Number.Value + 1 |
17 | if game.Teams [ "Red Team" ] .Number.Value < = game.Teams [ "Blue Team" ] .Number.Value then |
18 | player.TeamColor = BrickColor.new ( "Really blue" ) |
19 | game.Teams [ "Blue Team" ] .Number.Value = game.Teams [ "Blue Team" ] .Number.Value + 1 |
24 | local teams = game:GetService( "Teams" ):GetTeams() |
25 | for _, team in pairs (teams) do |
26 | local players = team:GetPlayers() |
28 | print ( "Team " .. team.Name .. " has " .. #players .. " players" ) |
01 | game.Players.PlayerAdded:connect( function (player) |
05 | if game.Teams [ "Blue Team" ] .Number.Value < = game.Teams [ "Red Team" ] .Number.Value then |
06 | player.TeamColor = BrickColor.new ( "Really red" ) |
07 | for i,v in pairs (game.Workspace.Red:GetChildren()) do |
08 | if v.Used = = false then |
15 | game.Teams [ "Red Team" ] .Number.Value = game.Teams [ "Red Team" ] .Number.Value + 1 |
17 | if game.Teams [ "Red Team" ] .Number.Value < = game.Teams [ "Blue Team" ] .Number.Value then |
18 | player.TeamColor = BrickColor.new ( "Really blue" ) |
19 | game.Teams [ "Blue Team" ] .Number.Value = game.Teams [ "Blue Team" ] .Number.Value + 1 |
24 | local teams = game:GetService( "Teams" ):GetTeams() |
25 | for _, team in pairs (teams) do |
26 | local players = team:GetPlayers() |
28 | print ( "Team " .. team.Name .. " has " .. #players .. " players" ) |