How do you do something when the mouse hovers over a Gui? What is the function you would set up for it?
✓ ANSWER ACCEPTED
something when the mouse hovers?
1 answer
✓ Accepted answer
For this, simply use the handle MouseEnter and MouseLeave events.
--Example Script
local Button = script.Parent
Button.BackgroundColor3 = Color3.new(1, 0, 0)
Button.MouseEnter:connect(function()
Button.BackgroundColor3 = Color3.new(1, 1, 1)
end)
Button.MouseLeave:connect(function()
Button.BackgroundColor3 = Color3.new(1, 0, 0)
end)
That script will change a button's background color to white when the mouse is over it, and red (I think) when the mouse is not over the button. Hope this helps :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
thx!