API Reference
Generated from the engine binding tables. Symbols marked server only are not available in client scripts.
Showing 68 of 68 items
Members are documented on their owning symbol pages; you can find them by searching or by choosing the Members category.
Guides
| Guide | Section |
|---|---|
| Getting Started | Guides |
| How to write your first script | Guides |
| Instances | Guides |
| Events | Guides |
| User Interface | Guides |
| Lighting and Materials | Guides |
| How to publish a place | Guides |
| The Simulation Tick | Guides |
| Server Authority and Replication | Guides |
| Entity and Script Lifecycle | Guides |
| The Server Tick and Physics | Engine |
| Entities and Instances | Engine |
| Replication and Events | Engine |
| Rendering | Engine |
| UI Layout and Text | Engine |
Instance
| Symbol | Description |
|---|---|
Instance | an entity in the place tree; the components it holds add the members listed under each section |
Game Services
| Symbol | Description |
|---|---|
Physics | queries the physics world with rays, overlaps, and sweeps, and sets the collision groups and gravity the solver uses |
World | iterates the entities of the running place and registers the systems that run over them every tick |
Tags | marks entities with named tags and finds every entity with that tag |
Prefabs | spawns saved prefabs by name and translates between prefab names and their numeric ids |
Profiler | reports where the last tick spent its time and how long each script took |
Lighting | sets the sun, sky, ambient light, and exposure that the renderer meters the scene with |
Animation | reads the markers an animation clip crossed since the last drain, and names the body parts a blend layer may move |
Sound | plays a cooked sound at a point in the world on every client, and sets the volume of surface contact sounds |
Locale | reads and switches the active locale, and translates a key into the text of that locale |
Session | tracks the players on this server, the character each one drives, and the signals that fire as they join, leave, and die |
Input | reads the keyboard and mouse state of the local client, and the camera ray under the cursor |
Items | loads the bytes of a place, a model, or an accessory in a scratch world and reports the facts it finds |
Store | opens a key-value store kept with the place, so its rows survive a restart |
CloudStore | opens a key-value store that every server of the experience shares |
Materials | lists, defines, and replaces the materials that parts render with |
Functions
| Symbol | Description |
|---|---|
print | write to the output |
warn | write a warning to the output |
tick | seconds from a monotonic clock |
EventTableDump | print every event table to the output |
Globals
| Symbol | Description |
|---|---|
Vector3 | 3D positions, directions, and velocities, with the axis and zero vectors alongside |
UDim2 | UI positions and sizes that hold their layout when the viewport resizes |
Rect | 2D bounds such as UI margins and screen extents |
Color3 | colors as red, green, and blue channels from 0 to 1 |
Vector2 | 2D points such as screen pixels and UI anchors |
Event | networked event tables |
self | the entity this script runs on |
handles | named entities of this place |
Types
| Symbol | Description |
|---|---|
RaycastResult | what a ray hit: the entity, the point, the surface normal, and the distance |
ShapecastHit | what a swept shape hit, and how far along the sweep it struck |
TouchEvent | two entities starting or stopping contact this frame |
FrameStats | where the last tick spent its time, and what Lua holds in memory |
ScriptCost | how often one script ran and how long each call took |
Identity | who a player is, and whether the account is an admin |
MoveIntent | where a character wants to move, and which way it should face |
SwingTwistJointDesc | the axes and angle limits to build a swing-twist joint from |
SwingTwistJointInfo | the axes and angle limits a live swing-twist joint reports |
AnimPreviewInfo | which clip the preview plays, and where playback sits |
AnimLayerRow | one blend layer: the clip it plays and how it mixes in |
Signal | an event you connect functions to |
Component | the fields of one component, read and written by name |
AnimLayers | the blend layers of a character, indexed by layer |
EventFieldType | the value type of one event table field |
EventDirection | whether an event table travels to the server or to the clients |
EventColumn | one field of an event table, holding a value per event |
EventTable | a batch of events the server and its clients send each other |
QueryColumn | one column a query matched, holding a value per entity |
Query | a reusable filter that matches entities by the components they hold |
UDim2 | a length on both axes, as a fraction of the parent plus a pixel offset |
Rect | an axis-aligned rectangle, from its minimum corner to its maximum corner |
Store | a store kept with the place, so its rows survive a restart |
CloudStore | a store every server of the experience shares, read and written asynchronously |
MaterialSpec | the textures, pipeline class, and physical terms one material renders with |