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

How do i make a part revert to original color on mouse leave?

Asked by
Sketchi 18
6 years ago

I have a script where the mouse enters a button and the part changes to that color and when the mouse leaves I want the color to go back to its previously selected color, is there a specific thing I have to do to accomplish this? Not asking for a script just a little help on how to get the old color back without putting in a new brick color when the mouse leaves .

Thanks!

1 answer

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

You could use this function: http://wiki.roblox.com/index.php?title=API:Class/GuiObject/MouseLeave

Example:

gui.MouseEnter:Connect(function()
    TextLabel.TextColor3 = Color3.fromRGB(59, 29, 20)
end)

gui.MouseLeave:Connect(function()
    TextLabel.TextColor3 = Color3.fromRGB(255, 255, 30)
end)
Ad

Answer this question