Converting BrickColor to Color3?

I’m making a character customization UI and attempting to display the color selected from a folder, all BrickColor3 Values because I want the options to only be set colors that I can save as string names, and attempting to display that color in a frame. It won’t work and the frame either turns black or get BrickColor issues. How would I go on fixing this?

local folder = script.Parent.ColorType
local display = script.Parent.Face_Template

local images = folder:GetChildren()
local numImages = #images
local currentImageIndex = 1

local model = script.Parent.Parent.Build_Display.ViewportFrame.Model

display.BackgroundColor3 = Color3.fromRGB(images[currentImageIndex].Value)

script.Parent.RightScroll.MouseButton1Click:Connect(function()
	currentImageIndex = currentImageIndex + 1
	if currentImageIndex > numImages then
		--currentImageIndex = 1
	end

	model:FindFirstChild("UpperTorso").Color = Color3.fromRGB(images[currentImageIndex].Value)
	script.Parent.Parent.Current_Edits.Shirt.Value = images[currentImageIndex].Value
	display.BackgroundColor3 = Color3.fromRGB(images[currentImageIndex].Value)
end)

script.Parent.LeftScroll.MouseButton1Click:Connect(function()
	currentImageIndex = currentImageIndex - 1
	if currentImageIndex < 1 then
		currentImageIndex = numImages
	end

	model:FindFirstChild("UpperTorso").Color = Color3.fromRGB(images[currentImageIndex].Value)
	script.Parent.Parent.Current_Edits.Shirt.Value = images[currentImageIndex].Value
	display.BackgroundColor3 = Color3.fromRGB(images[currentImageIndex].Value)
end)

This is just answering the title of the Topic, and not the Topic itself, so sorry if off topic:

BrickColor is already made from Color3 values, so I dont see what you mean by “Convert BrickColor to Color3.”

function toColor3(brickColor)
    return Color3.new(brickColor.r, brickColor.g, brickColor.b) -- literally the Color3 of the BrickColor
end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.