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

MouseButton1Down

Fired when the mouse is in the left mouse down state on the GUI object.

Parameters

Name Type Default Description

x

int

y

int

Code Samples


GuiButton.MouseButton1Down

The below example would print the position of where the GuiButton was clicked on the screen.

Gui.MouseButton1Down:Connect(function(X, Y)
    print(("Left mouse click at (%s, %s)"):format(X, Y))
end)