Playerlist doesnt update after changing team color

Currently having players be able to change their team by chat commands,

  • Team Changing is done via server
  • Chat updates the player’s team color just fine
  • Player list doesn’t update the player’s team color

server code:

game.Players.PlayerAdded:Connect(function(Player)
	Player.Chatted:Connect(function(msg)
		msg = string.lower(msg)
		if msg == "red" then
			Player.TeamColor = BrickColor.new("Really red")
		elseif msg == "blue" then
			Player.TeamColor = BrickColor.new("Toothpaste")
		end
	end)
end)

By Default the player is not assigned a team, in the image below i first say “red” then I say “blue” and as you will see it changes the chat properly

2 Likes

Make sure the Player.Netural property is set to false. I could not reproduce it under any conditions other than having it set to true.

.Neutral set to true:

.Neutral set to false:

1 Like

right but there is no setting i can adjust in studio to make it default like that? Can’t find any at least, so assuming its just needs to be done via code as the player joins

The property is toggled if the player is not automatically assigned a team on run-time. You can either create a neutral/standard/lobby team with the Team.AutoAssignable property toggled or manually set Player.Neutral to false whenever you update their team.

In the context of this bug report, it would make sense for the Neutral property to be automatically set to false on team change. This is currently the case when assigning the Player.Team property to a team instance, however not so with the TeamColor property.