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") -> ())?, }) → HitboxParameters
Returns
Hitbox