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)
player.TeamColor = BrickColor.new(game.Teams["House Members"].TeamColor)
You just need to use game.Teams["House Members"].TeamColor
because that already is a BrickColor. Using BrickColor.new(brickcolor)
doesn't work and returns grey (default color).