Placers
The Placers library lets players position objects in the world using a placement preview system. Two approaches are available: a simple one-shot helper (Placeable) and a more controllable object-based API (PlaceableObject).
Side: Client
Placeable (Simple API)
PlaceObject
Starts an interactive object placement session. The player sees a ghost preview of the object and can position it with the mouse. Returns the final coordinates once the player confirms placement, or nil if cancelled.
local coords = Bridge.Placeable.PlaceObject(object, distance, snapToGround, allowedMats, offset)
-- Returns: vector3 | nil| Parameter | Type | Description |
|---|---|---|
| object | string | number | Model name or hash of the object to place |
| distance | number | Maximum placement distance from the player |
| snapToGround | boolean | If true, the preview snaps to the ground surface |
| allowedMats | table | Table of allowed material hashes (placement only valid on these surfaces) |
| offset | vector3 | Offset applied to the preview object position |
StopPlacing
Cancels the current placement session started by PlaceObject.
Bridge.Placeable.StopPlacing()PlaceableObject (Advanced API)
Provides finer control with start/stop lifecycle, mode querying, and entity access.
Create
Creates a new placeable object session with configurable settings. Does not block ďż˝ use events or polling with IsPlacing to detect completion.
PlaceableObject.Create(model, settings)| Parameter | Type | Description |
|---|---|---|
| model | string | number | Model name or hash |
| settings | table | Placement settings (see below) |
Settings fields:
| Field | Type | Description |
|---|---|---|
| distance | number | Maximum placement distance |
| snapToGround | boolean | Snap to ground surface |
| allowedMats | table | Allowed material hashes |
| offset | vector3 | Position offset for the preview |
Stop
Cancels the active PlaceableObject session.
PlaceableObject.Stop()IsPlacing
Returns whether a placement session is currently active.
local placing = PlaceableObject.IsPlacing()
-- Returns: booleanGetCurrentEntity
Returns the entity handle of the preview object being placed.
local entity = PlaceableObject.GetCurrentEntity()
-- Returns: number | nilGetCurrentMode
Returns the current interaction mode of the placement session.
local mode = PlaceableObject.GetCurrentMode()
-- Returns: string | nil