Help creating teams

I want to make a team for each player when they join the game but it only creates one team for the first person to load in and then moves every new player to that team. This is the script

game.Players.PlayerAdded:Connect(function(player)
	local playerTeam = Instance.new('Team')
	playerTeam.AutoAssignable = false
	playerTeam.Parent = game.Teams
	playerTeam.Name = player.Name
	player.Team = playerTeam
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")

Players.PlayerAdded:Connect(function(player)
    local playerTeam = Instance.new('Team')
    playerTeam.AutoAssignable = false
    playerTeam.Name = player.Name
    playerTeam.Parent = Teams
    player.Team = playerTeam
end)

This resulted in the same issue

Have you tried setting the team color ?

Idk how I didn’t think of this. Thank you bro :sob:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.