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)