I am trying to disable the neutral team in every player that joins my game, does anyone know why this script is not working? I tried everything but it just would not work. Here is my script:
wait(0.3)
local Performers = Instance.new("Team")
Performers.Parent = game.Teams
Performers.TeamColor = BrickColor.new("Bright green")
Performers.Name = "Performers"
local Performer = Instance.new("Team")
Performer.Parent = game.Teams
Performer.Name = "Judges"
Performer.TeamColor = BrickColor.new("Plum")
local Performe = Instance.new("Team")
Performe.Parent = game.Teams
Performe.Name = "Audience"
Performe.TeamColor = BrickColor.new("Lapis")
local Perform = Instance.new("Team")
Perform.Parent = game.Teams
Perform.Name = "Dancers"
Perform.TeamColor = BrickColor.new("New Yeller")
local Perfor = Instance.new("Team")
Perfor.Parent = game.Teams
Perfor.Name = "Practicing"
Perfor.TeamColor = BrickColor.new("Really red")
game.Players.PlayerAdded:Connect(function(plr)
players = game.Players:GetPlayers()
for _, v in pairs(players) do
v.Team.Neutral = false
end
end)
Its because the new player that joins doesn’t have a team, and is automatically set to neutral. Just set one of the team’s AutoAssignable = true, and it’ll go away.
You can add these teams in as parts in workspace. Configure their properties as you wish.
If just one of the teams has the AutoAssignable property enabled, then all players joining will be placed on that team and that team only. In your scenario, maybe the Practicing Team.
Important note: You need a team to be on AutoAssignable for the Neutral Team to not be generated by Roblox. If there are no teams in the game, the Neutral Team is default and doesn’t appear as a category in the PlayerList.