I threw together a simple script that was supposed to change a player's team color on entry. It didn't work. I traced the problem down to the player's team color simply not changing. If I replaced the line that changed the team color with any other arguments, it would run. How do I change a player's team color on entry?
The script:
game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(311892) then newPlayer.TeamColor = BrickColor.new("Really black") end end)
This isn't the exact script I used, but demonstrates what I did. There were no errors in the output.
game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(311892) then newPlayer.TeamColor = game.Teams["Really Black"].TeamColor -- Make a team called Really Black then make it's team color really black. if (newPlayer.TeamColor = = game.Teams["Really Black"].TeamColor) and (newPlayer:IsInGroup(311892)) then print("No error ") else print("Player not in group") end end end)
I don't know if it works but you can try :P. Please tell me if it works