I’m attempting to change the ImageColor3 value of an ImageButton from 255,255,255 to 140,140,140. This does not succeed for no other reason than when I run a playtest, the value goes from its default 255,255,255 to some insanely high number like 459345945,3475381234,5743864584. It still appears white, and it still changes when I attempt to darken the image, but this insanely high number is simply reduced by half.
3 Likes
Could you please show your code?
2 Likes
Are you using Color3.new() instead of Color3.fromRGB()
6 Likes
local button = script.Parent.Button
button.ImageColor3 = Color3.new(255,255,255)
function mouseover()
script.Parent.Size = UDim2.new(0.22,0,0.22,0)
script.Parent.Button.ImageColor3 = Color3.new(1,1,1)
end
function mouseoverend()
script.Parent.Size = UDim2.new(0.2,0,0.2,0)
script.Parent.Button.ImageColor3 = Color3.new(255,255,255)
end
button.MouseEnter:Connect(mouseover)
button.MouseLeave:Connect(mouseoverend)
Dont use color3.new use color3.fromrgb to get the 0 to 255 range
5 Likes
Color3.new has a range of 0 to 1
Thanks.
No problem, dont forget to accept my response as a solution
2 Likes