textLabel.TextColor3 = BrickColor.new(players.TeamColor).Color3
I am trying to get the TextLabel to become the same color as the players teamcolor, but since a TextLabel uses Color3 and TeamColor is BrickColor
textLabel.TextColor3 = BrickColor.new(players.TeamColor).Color3
I am trying to get the TextLabel to become the same color as the players teamcolor, but since a TextLabel uses Color3 and TeamColor is BrickColor
Let's assume "GUI" is the TextLabel you want to edit.
If you want it's color to be relative to the player's teamcolor.
You should do this :
GUI.TextColor3 = game.Players.LocalPlayer.TeamColor.Color
Doesn't work, has the error 'attempt to index field 'TeamColor' (a nil value)'
Works for me. Are you sure it's in a LocalScript?
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Remove the 3 from .Color3 . Should just be players.TeamColor.Color
It has an error saying 'attempt to index field 'TeamColor' (a nil value)' but when I printed in the server output the players teamcolor it does print a color