Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Make a GUI visible when a player hovers their cursor over another GUI?

I've been trying to figure this out for a while now, but everything I try doesn't work. The code I'm using is:

script.Parent.ClickDetector.MouseHoverEnter:connect(function(hover)
script.Parent.Parent.Textlabel.Visible = true
end)

The only problem is, I can't get a Click Detector inside of a TextButton... Any suggestions?

1 comment

0

I can tell you its "script.Parent.MouseEnter"

1 answer

local otherItem = script.Parent.Parent.OtherItem -- Change this to the item that will be hovered over to give the other item visibility

--[[
	The below handler would make your item appear when 'otherItem' is hovered over
]]
otherItem.MouseEnter:connect(function()
	script.Parent.Visible = true
end)

--[[
	The below handler would make your item disappear when 'otherItem' is no longer hovered over
]]
otherItem.MouseLeave:connect(function()
	script.Parent.Visible = false
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.