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

How do you make a frame become visible when a cursor moves over it?

Asked by 10 years ago

How do you make a script, where if you move a cursor over a GUI button, then it will make the frame become visible?? And when you move it off of the button, then it wont be visible.

0
Also do you know how to make it fade when it goes visible and not visible?? Wrongmistake 0 — 10y

2 answers

Log in to vote
0
Answered by
Mowblow 117
10 years ago

Make sure the button's or Frame's active property is set to "active". Then the code should be:

local frame = script.Parent
frame.MouseEnter:connect(function()
frame.Visible = true
end)
frame.MouseLeave:connect(function()
frame.Visible = false
end)

I'm pretty sure this should work, PM me @Mowblow on roblox if it does not.

Ad
Log in to vote
0
Answered by 10 years ago

Use the 'MouseEnter' and 'MouseLeave' events for the button/label. With the fading, you can just do a loop to change the transparency in the function. Comment if you'd like an example, I didn't put a script just in case you wanted to make the script by yourself :)

Answer this question