Changing TeamColor forces players to change their teams

Greetings all

soo, well. here i got a script:

game.Players.PlayerAdded:Connect(function(player)
	player:GetPropertyChangedSignal("Team"):Connect(function()
		print(1)
	end)
	
	player:GetPropertyChangedSignal("TeamColor"):Connect(function()
		print(2)
	end)

	wait(5)
	print(player.Team)
	game.Teams.TestTeam.TeamColor = BrickColor.new("Dark green")
	print(player.Team)
end)

output will be:

TestTeam  -  Server - Script:11
1  -  Server - Script:3
nil  -  Server - Script:14

why changing TeamColor forces players to change their team?? I know i can avoid this by adding them back into their team but thats not what i want to understand.

Even if we are going to use:
player.Team.TeamColor = BrickColor.new("Dark green")
instead of
game.Teams.TestTeam.TeamColor = BrickColor.new("Dark green")
result still will be the same.

are there any methods so i can change player TeamColor or just team color without moving them into ‘neutral’ team?

If I remember correctly, Players have a property called “TeamColor”.

Lets say, a players TeamColor is “Navy Blue” and Team1 is “Navy Blue”.

If you change Team1’s color to Pearl, no team with the color “Navy Blue” will exist, forcing them into neutral.

If you’d want them to still be on that team, you have to use :GetPropertySignalChanged() on the team and then reteaming the players on it.

I might be wrong, I might be correct.

A Team is tied to a unique TeamColor.

Setting the player’s TeamColor is the same operation as setting that player’s Team.

There is no way to change a player’s TeamColor without changing their Team.

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