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

What is 'MouseEntered' & 'MouseLeave' and how do I use them ?

Asked by 6 years ago

So recently I found the two functions as the title says: MouseEntered and MouseLeave. This is no request, but I'd like to know what are they and how to use them ?

1 answer

Log in to vote
0
Answered by 6 years ago

These functions belong to a GuiObject. It just says when a player's mouse enters or leaves the region of a GuiObject (like a TextLabel); I would use these in a LocalScript.

guiObject.MouseEntered:Connect(function()
    print("frog")
end)

You can learn more about it here: http://wiki.roblox.com/index.php?title=API:Class/GuiObject/MouseEnter

Ad

Answer this question