Needing help with Team Changing Script

Hello Developers of ROBLOX,
I am currently trying to make a script that changes a player’s team.
The problem is, that anything I try (even things that should work) doesn’t work, it doesn’t even print the error.
I already searched the Developer Forum and every “working” method didn’t work.

This is the script:

game.ReplicatedStorage.TeamChange.OnServerEvent:Connect(function(player)
	player.Team = game.Teams.ExampleTeam
	print("Player's Team Changed!")
end)

Please help me and best regards,
Grimm

I don’t like using the “game.Teams.TeamName”, what I use is BrickColor. Assign a team to a brickColor and do like:

game.ReplicatedStorage.TeamChange.OnServerEvent:Connect(function(player)
         player.TeamColor = BrickColor.new("White")
         print("Player's Team Changed!")
end

That’s just what I do.

What do I do when the TeamColors are the same?

Change the TeamColor in teams. Or, if you want I can tell you a different method.

I will try to change the TeamColor and tell you if it worked.