Guide 1 Docs 2 Reference 3

Function of Screen

screen.on_click

Called with the pixel the player points at and the button, when a player clicks the screen. nil or false takes the hook off.

screen.on_click(((player: Player, x: number, y: number, button: "left" | "right") -> ()) | false) → ?

Parameters

((playerPlayer, x: number, y: number, button: "left" | "right") -> ()) | falserequired

Returns

?