Guide 1 Docs 2 Reference 3

Function of Players

players.on_break

Cancellable. Return false to stop it; return nothing to let it through. These are asked *before* the world changes and the engine waits milliseconds for the answer, so they must be quick and must never task.wait. Timeout, error, overflow and disabled handlers deny the action. Across packs any false wins. See docs/luau-api.md, "saying no".

players.on_break(fn: (player: Player?, pos: Vec3, block: string) -> boolean?) → Connection

Parameters

fn(player: Player?, pos: Vec3, block: string) -> booleanoptional

Returns

Connection

Used in