Guide 1 Docs 2 Reference 3

Function of World

world.hitbox

Makes an invisible box a player can click; solid also makes it a wall. depth is the width unless given. 1.19.4 and later.

world.hitbox(opts: { at: Vec3, width: number?, height: number?, depth: number?, solid: boolean?, on_click: ((player: Player, button: "left" | "right") -> ())?, }) → Hitbox

Parameters

opts{ at: Vec3, width: number?, height: number?, depth: number?, solid: boolean?, on_click: ((player: Player, button: "left" | "right") -> ())?, }required

Returns

Hitbox

Used in