The code below is supposed to change the team of a player, the player’s team color is changed but on the leaderboard, it still shows the player on the unchanged team.
player.TeamColor = BrickColor.new("Crimson")
print(player.TeamColor) --prints Crimson
player:LoadCharacter() --refresh the player without killing them
When I run the code, the player’s team color changes and the player’s original team still stays the same.
local Team = Instance.new("Team")
local Teams = game:GetService("Teams")
Team.Name = "New Team"
Team.TeamColor = BrickColor.new("Crimson")
Team.Parent = Teams
# -- instead of all that the Team object could be made to exist implicitly server-side via adding through Studio
player.Team = Team
# -- set it like that