how do i make a gui that opens when i hover my mouse over it and stays open until i move it off of it??
COMMUNITY QUESTION
how to make a gui open when mouse hovers over it?
1 answer
This is not a request site. However since it's a pretty easy, i'll include an answer. Please try to avoid requesting and learn yourself instead.
You can easily do it by using MouseEnter and MouseLeave functions. Put these lines in a LocalScript and it should work.
local frame = script.Parent.Parent.Frame -- May have to change
local button = script.Parent
button.MouseEnter:Connect(function()
frame.Visible = true -- Makes the frame visible when you hover in
end)
button.MouseLeave:Connect(function()
frame.Visible = false -- Makes the frame invisible when you hover out
end)
-- Do the same below for the frame so the frame keeps visible when you hover on the frame --
button.MouseEnter:Connect(function()
frame.Visible = true -- Makes the frame visible when you hover in
end)
button.MouseLeave:Connect(function()
frame.Visible = false -- Makes the frame invisible when you hover out
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
