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

How to change BrickColor to Color3 ???

Asked by 3 years ago

So below is my script. I have a BrickColor value but I need it to be a Color3 value to change the color of my text button GUI. How do I make the BrickColor value to a Color3 value?

local ChosenColor = game:GetService("Workspace"):WaitForChild("Configuration").ChosenColor

ChosenColor.Changed:Connect(function()
    script.Parent.BackgroundColor3 = ChosenColor.Value
end)

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Use BrickColor.Color

0
Its not working. THUNDER_WOW 203 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Store a variable (brickColor) and use Color when referencing it

local bc = BrickColor.new("Lime green") -- change it if u Want

print(bc.Color) -- it should print the color3 value
0
I'll try this and let you know later. THUNDER_WOW 203 — 3y
0
Players.THUNDER_WOW.PlayerGui.Primary.ChosenColor.ChosenColor Script:4: attempt to call a nil value THUNDER_WOW 203 — 3y
0
I get that error not that I did script.Parent.BackgroundColor3 = BrickColor.Color(ChosenColor.Value). THUNDER_WOW 203 — 3y
0
hmm, i'm not sure what's causing your error. It might be something in your script thats causing it. rayhansatria 142 — 3y

Answer this question