How would I grab this RGB value?

I have a color wheel GUI that changes the Image Colour of an Image Label and I am trying to incorporate this into changing skin color.

I made a script that I thought would work but sadly didn’t. I don’t even know if the color part is the script but I’m assuming so because there are no errors. Could someone please help?

ServerScript:


local GUI = script.Parent.Parent.Parent.Parent.Parent
local player = GUI.Parent.Parent
local char = player.Character


-- Wheel --
local colourWheel = script.Parent:WaitForChild("ColourWheel")
local wheelPicker = colourWheel:WaitForChild("Picker")


-- Slider --
local darknessPicker = script.Parent:WaitForChild("DarknessPicker")
local darknessSlider = darknessPicker:WaitForChild("Slider")

-- Colour --
local colourDisplay = script.Parent:WaitForChild("ColourDisplay")
local colour = colourDisplay.ImageColor3

-- Extras -- 
local buttonDown = false
local movingSlider = false


wheelPicker.MouseButton1Down:Connect(function()
	buttonDown = true
	movingSlider = true

end)

wheelPicker.MouseButton1Up:Connect(function()
	buttonDown = false
	movingSlider = false
	
	for i, part in pairs(char:GetChildren()) do
		if part:IsA("BasePart") then
			part.BrickColor = colour
		end
	end
end)



darknessSlider.MouseButton1Down:Connect(function()
	buttonDown = true
	movingSlider = true
	
end)

darknessSlider.MouseButton1Up:Connect(function()
	buttonDown = false
	movingSlider = false
	
	for i, part in pairs(char:GetChildren()) do
		if part:IsA("BasePart") then
			part.BrickColor = colour
		end
	end
end)

I had to do something similiar today but with text labels, i think it should work with image labels too, what i did was: part.BrickColor = BrickColor3.new(label.BackgroundColor3)

Try changing part.BrickColor = colour to part.BrickColor = BrickColor.new(colour)

1 Like

Thank you but it didn’t work.

I think it’s having a problem executing the function then so I’ll have to test to see if the functions are working.

1 Like

Hey, i think you should use the Color property of a part insead of BrickColor

try:

local GUI = script.Parent.Parent.Parent.Parent.Parent
local player = game.Players.LocalPlayer

-- Wheel --
local colourWheel = script.Parent:WaitForChild("ColourWheel")
local wheelPicker = colourWheel:WaitForChild("Picker")


-- Slider --
local darknessPicker = script.Parent:WaitForChild("DarknessPicker")
local darknessSlider = darknessPicker:WaitForChild("Slider")

-- Colour --
local colourDisplay = script.Parent:WaitForChild("ColourDisplay")
local colour = colourDisplay.ImageColor3

-- Extras -- 
local buttonDown = false
local movingSlider = false


wheelPicker.MouseButton1Down:Connect(function()
	buttonDown = true
	movingSlider = true

end)

wheelPicker.MouseButton1Up:Connect(function()
  local char = player.Character
	buttonDown = false
	movingSlider = false
	
	for i, part in pairs(char:GetChildren()) do
		if part:IsA("BasePart") then
			part.BrickColor = BrickColor.new(colour)
		end
	end
end)



darknessSlider.MouseButton1Down:Connect(function()
	buttonDown = true
	movingSlider = true
	
end)

darknessSlider.MouseButton1Up:Connect(function()
local char = player.Character
	buttonDown = false
	movingSlider = false
	
	for i, part in pairs(char:GetChildren()) do
		if part:IsA("BasePart") then
			part.BrickColor = BrickColor.new(colour)
		end
	end
end)
local R,G,B = 255,0,0 -- Replace with RGB color that you want.
part.Color= Color3.fromRGB(r,g,b)