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

How to change BrickColor to Color3 ???

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

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

4 comments

0

I'll try this and let you know later.

0

Players.THUNDER_WOW.PlayerGui.Primary.ChosenColor.ChosenColor Script:4: attempt to call a nil value

0

I get that error not that I did script.Parent.BackgroundColor3 = BrickColor.Color(ChosenColor.Value).

0

hmm, i'm not sure what's causing your error. It might be something in your script thats causing it.

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