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

Making a button change color as it is clicked, but not setting to correct color? [Answered]

I made this button to change color to look darker as you pressed it for just a feel and the color change doesnt work and I don't know what's going on, because its setting it to black

MenuFrame = script.Parent.Parent

script.Parent.MouseButton1Down:Connect(function()
	print("work")
	MenuFrame.Main.ImageColor3 = Color3.new("221/255, 149/255, 6/255")
	print("work2")
	MenuFrame.buttonShadow.ImageColor3 = Color3.new("172/255, 116/255, 4/255")
	print("work3")
end)

and with line 5 and 7 I also removed /255 and it didnt work. And I mean to do imagecolor because I used round images for gui

1 answer

✓ Accepted answer

When using the RGB color spectrum, you have to use:

local color = Color3.fromRGB(255,255,255)

Hope this helped!

1 comment

0

This worked! Thanks!

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