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

Is there an easy way to get a color3 from a brick color?

I'm trying to make a script that finds your skin color and then changes the background color of a set of ImageButtons to that same color, but the color of ImageButtons use Color3, and skin color uses Brick Color. I know I could just make a bunch of 'if' and 'elseif' statements for each kind of skin color but I'd rather find an easier and less boring way to do it. This is the important part of my script:

local head = plr.Character["Body Colors"].HeadColor
local decals = plr.PlayerGui.GUI.Frame.ScrollingFrame:GetChildren()
	for i = 1, #decals do
		decals[i].BackgroundColor3 = head
	end

I have the error message if it helps understanding the problem since I'm terrible at explaining things

bad argument #3 to 'BackgroundColor3' (Color3 expected, got BrickColor)

1 answer

Well there is a Color3 property of brickcolor so all you would have to do is thebrickcolor.Color

local head = plr.Character["Body Colors"].HeadColor
local decals = plr.PlayerGui.GUI.Frame.ScrollingFrame:GetChildren()
for i = 1, #decals do
	decals[i].BackgroundColor3 = head.Color
end

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