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

How to get Color3 from TeamColor?

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

2 comments

0

Remove the 3 from .Color3 . Should just be players.TeamColor.Color

0

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

1 answer

✓ Accepted answer

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

2 comments

0

Doesn't work, has the error 'attempt to index field 'TeamColor' (a nil value)'

0

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.