How do i do this? MouseHoverEnter

all i know what to do for this is:
local --anything = script.Parent
local ClickDetector = Instance.new(“ClickDetector”)|
ClickDetector.Parent = --anything
ClickDetector.MaxActivationDistance = 32

ClickDetector.MouseHoverEnter:Connect(function()
–script hree–

end)

ClickDetector.MouseHoverEnter:Connect(function()
– script here–

end)

So basically im trying to make once a player touch a gui it shows something like for e.g go in adopt me and just put your mouse on one of the guis you will see a textlabel showing info

What seems to be the problem with the code?

Do you mean touch or mouse hover?
Also, It’s a ScreenGUI or SurfaceGUI, or BillboardGUI?

Well, you don’t need a ClickDetector if it’s for a GUI.

If it’s in a Part, then of course you’re going to need it but not in GUIs.

screengui (taking upp spaceeeeee

its in a gui . . . … . . … … taking up space

In a local script inside the UI, just do something like:


local toShow = --location

script.Parent.MouseEnter:Connect(function()
 toShow.Visible = true
print("Showing")
wait(1)
end)

script.Parent.MouseLeave:Connect(function()
toShow.Visible = false
print("Hidden")
end)
1 Like