I got when you hover over a part, a gui pops up but when the players mouse leaves, I want the gui to have visible = false
function Leave (Player) end Part = script.Parent function Enter (Player) for i,v in pairs {Player} do v.PlayerGui.Hovered.Label.Visible = true script.Parent.String.Value = "Cup" end end Part.ClickDetector.MouseHoverEnter:connect(Enter)
script.Parent.ClickDetector.MouseHoverEnter:connect(function(plr) for i,v in pairs {plr} do v.PlayerGui.Hovered.Label.Visible = true script.Parent.String.Value = "Cup" end end) script.Parent.ClickDetector.MouseHoverLeave:connect(function(plr) plr.PlayerGui.Hovered.Label.Visible = true --script.Parent.String.Value = "derp" end)
So first off i redid the organization of the script, it will work the same exact way. Secondly you had everything right. But for the problem you have, you must use the ****MouseHoverLeave**** event. This event fires whenever the mouse cursor leaves the click detector.
----Hope i helped you