Guide 1 Docs 2 Reference 3

Function of Players

players.on_click

Calls fn on a left or right click; hit holds the button and the entity, player, block and face it met.

players.on_click(fn: (player: Player, hit: Hit) -> ()) → Connection

Parameters

fn(player: Player, hit: Hit) -> ()required

Returns

Connection

Used in