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

Trying to make a ImageLabel's color fade to another, but its not working. What am I doing wrong?

Asked by 7 years ago
Edited 7 years ago

I am experimenting with a MMORPG menu and whenever a player hovers their mouse over options (e.g, Play, Shop) it will change color, I don't want it to instantly change color though. I want to make it fade into that other color. The text is white. But I want to make it become red. TextLabel / TextButton is not involved in this just so there is no confusion. EDIT: It's an ImageLabel.

ImageLabel.ImageColor3 = ImageLabel.ImageColor3 - Color3.new(0, 1/255, 1/255)
0
I still need help. Naxxanar 77 — 7y
0
What is your target Color3? shadownetwork 233 — 7y

1 answer

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

This should work:

r = ImageLabel.ImageColor3.r
g = ImageLabel.ImageColor3.g
b = ImageLabel.ImageColor3.b
ImageLabel.ImageColor3 = Color3.fromRGB(r, g -1, b-1)

You would need some kind of loop to make it actually tween.

P.S. The wiki is so helpful http://wiki.roblox.com/index.php?title=API:Color3

Ad

Answer this question