Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to convert teamcolor to a color3 value?

Asked by 5 years ago

i want to make the textcolor3 of a textlabel the same color as the players team color.

    game.ServerStorage.overhead:Clone().Parent = head
    head.overhead.title.Text = team.Name
    color = team.TeamColor
    head.overhead.title.TextColor3 = Color3.new(color)

this does not return an error, however it just sets the color of the textlabel to black. (0,0,0)

0
Wouldent you just set it to color, not color3.new(color)? OBenjOne 190 — 5y
0
Because as ceolor3.new(color) youve just basically said color3.new(color3.new(X,Y,Z)) right? OBenjOne 190 — 5y
0
it returns the following error - ServerScriptService.insteroverhead:12: bad argument #3 to 'TextColor3' (Color3 expected, got BrickColor) FallenZalio 99 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

Since team color is a brick color value, use this to convert brick color to color3:

--brickcolor.Color--

game.ServerStorage.overhead:Clone().Parent = head
head.overhead.title.Text = team.Name
color = team.TeamColor -- if color is a brick color

head.overhead.title.TextColor3 = color.Color
0
Can you get teamcolor.color? I thought that was just teamcolor OBenjOne 190 — 5y
0
yea Ido_nothaveUsername 213 — 5y
0
Hmmmm. OBenjOne 190 — 5y
0
Oh yeah :D I forgot for a second there sry OBenjOne 190 — 5y
Ad

Answer this question