PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

MouseEnter

Fires when a user moves their mouse into a GUI element.

Parameters

Name Type Default Description

x

int

y

int

Code Samples


Printing where a Mouse Enters a GuiObject

The following example prints the mouse location, in pixels, when it enters GUI element.

GuiObject.MouseEnter:Connect(function(x, y)
	print("The user's mouse cursor has entered the GuiObject at position (" .. x .. ", " .. y .. ").")
end)