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

How can I make a Label's text colour dependent on the player's team colour?

I made an Overhead UI that shows a player's rank in group. However, I got a few teams and I want to make it so, the team the player is on, makes the UIs color the same as the team color. For example, if Visitors is green, then if the player is in that team, the GUI will be green, and if the player joins the raiders team (red team colour) the GUI will be red. I tried doing this with if statements, like:

if Player.TeamColor == green then
	UI.Label.Color3 = Color3.new(75, 151, 75)
end

Of course this script is not exactly what I have, but it may give you an idea on what I wanted to do.

Waiting for some help.

iiHypocratic

1 comment

0

UI.Label.Color3 = Player.TeamColor.Color You could try something like that.

1 answer

You could try doing something like this:

if Player.TeamColor == green then
	UI.Label.Color3==Player.TeamColor.Color
end

2 comments

0

TeamColor returns a brick color, you would want to index the Color property of a BrickColor.

0

Oh okay got you then I'll change it to TeamColor.Color which will make it a color3 value.

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