Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ImageColor3 wont change after tweening.?

Asked by
ColdxN 0
8 years ago

gyazo.com/d8dac3c9d4328beea430279ab3b9c892

After i open the gui Menu the 1st button is supposed to go dark with ImageColor3 but it wont work..

local Button = script.Parent

script.Parent.MouseEnter:connect(function()
    Button.ImageColor3 = Color3.fromRGB(158,158,158)
end)

script.Parent.MouseLeave:connect(function()
    Button.ImageColor3 = Color3.fromRGB(255,255,255)
end)
0
I just tested this code and it works fine. Don't post code that works and ask us to fix it. Is the script disabled? Show us the tweening too please. User#11440 120 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

I have never personally used fromRGB(), so i don't know much about it. I find that just doing new works everytime for me. I don't know if you have given it a try, but it might work.

local Button = script.Parent;

script.Parent.MouseEnter:connect(function()
    Button.ImageColor3 = Color3.new(158/255,158/255,158/255);
end);

script.Parent.MouseLeave:connect(function()
    Button.ImageColor3 = Color3.new(1, 1, 1);
end);

Best of luck. Hope this helps.

0
Color3.new() Takes three numbers that are between 0 and 1. This would not work for that reason. https://gyazo.com/9ac8d084c0462e5e657c90791e7d7c51 User#11440 120 — 8y
0
This code does work. (ps. I am really tired and forgot to do that /255 in the first place.) MrLonely1221 701 — 8y
Ad

Answer this question