Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Player not changing team?

Hi all. This script is meant to change the player's team if he's in a specific rank or higher. Apparently it's not working at all. Any problems? It is in a ServerScript. I understand from the wiki that it may not return live values, but that's not a problem.

game.Players.PlayerAdded:connect(function(player)
	if player:GetRankInGroup(2641172) >= 185 then
		player.TeamColor = BrickColor.new(game.Teams["House Members"].TeamColor)
	end
	print(player:GetRankInGroup(2641172))
	player:LoadCharacter() --Respawn Character
end)

1 answer

✓ Accepted answer

player.TeamColor = BrickColor.new(game.Teams["House Members"].TeamColor) You just need to use game.Teams["House Members"].TeamColorbecause that already is a BrickColor. Using BrickColor.new(brickcolor) doesn't work and returns grey (default color).

This discussion is preserved as it was. New answers, comments, and votes are closed.