Available in every script without a receiver.
| Member | Kind | Description |
|---|---|---|
game(): DataModel |
global | Root of the game tree. Use game:GetService(name). |
workspace(): Workspace |
global | Shortcut for game:GetService("Workspace"). |
script(): Script |
global | The running script. script.Parent is the owning brick. |
task(): task |
global | Task scheduler library (task.wait/spawn/delay). |
Enum(): Enums |
global | Table of enum values (Material, KeyCode, ...). |
wait(seconds: number?): number |
function | Yields the current thread for the given seconds (default 1/30). Returns elapsed time. |
spawn(fn: function): void |
function | Runs fn on a new scheduled thread as soon as possible. |
delay(seconds: number, fn: function): void |
function | Runs fn on a new scheduled thread after the given delay. |
tick(): number |
function | Seconds since the engine started (monotonic game clock). |
time(): number |
function | Alias of tick(); seconds since the engine started. |
typeof(value: any): string |
function | Returns the datatype name of a value (Vector3, Color3, Instance, ...). |
print(...: any): void |
function | Prints values to the output log. |
warn(...: any): void |
function | Prints values to the output log as a warning. |
Instance(): Instance |
global | Instance.new(className). Part/Block/WedgePart/Truss/SpawnLocation/Seat/MeshPart/BasePart/Brick all make a brick; ScreenGui/Frame/TextLabel/TextButton/ImageLabel/ImageButton/TextBox make GUI elements; ParticleEmitter makes an emitter. Anything else becomes a generic tree node. |
Vector2(): Vector2 |
global | Vector2 datatype constructor table. |
Vector3(): Vector3 |
global | Vector3 datatype constructor table. |
Color3(): Color3 |
global | Color3 datatype constructor table. |
CFrame(): CFrame |
global | CFrame datatype constructor table (position + rotation). |
UDim2(): UDim2 |
global | UDim2 datatype constructor table. |
NumberSequence(): NumberSequence |
global | NumberSequence constructor table (a value over a particle's lifetime). |
NumberSequenceKeypoint(): NumberSequenceKeypoint |
global | NumberSequenceKeypoint constructor table. |
ColorSequence(): ColorSequence |
global | ColorSequence constructor table (a colour over a particle's lifetime). |
ColorSequenceKeypoint(): ColorSequenceKeypoint |
global | ColorSequenceKeypoint constructor table. |