Developer tools

LuX API

Search the services, instances, value types, and enums that LuX scripts can use in the BrickBit client.

Globals

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.
Services

Reached with game:GetService("Name") or the game.Name shortcut. A name not listed here returns nil and logs a warning.

Workspace

Container for the 3D world and bricks.

Member Kind Description
GetBrick(id: number): Instance? method Returns the brick with the given id, or nil.
FindFirstChild(name: string): Instance? method Finds a brick by name (case-insensitive).
GetBricks(): {Instance} method Returns an array of every brick in the map.
GetChildren(): {Instance} method Alias of GetBricks().
BrickCount: number property Number of bricks currently loaded.
Gravity: number property World gravity in studs/s^2 (best-effort, read-only).
Players

Container of connected players.

Member Kind Description
LocalPlayer: Instance? property The local player (client only).
GetPlayers(): {Instance} method Returns an array of all players.
GetPlayerByNetId(netId: number): Instance? method Returns the player with the given network id.
PlayerAdded: Event event Fires when a player joins. Handler receives the player.
PlayerRemoving: Event event Fires when a player leaves. Handler receives the player.
Lighting

Environment/lighting properties (best-effort mapping to the world env).

Member Kind Description
Ambient: Color3 property Indoor ambient color; blended into the env ambient (best-effort).
OutdoorAmbient: Color3 property Outdoor ambient color; blended into the env ambient (best-effort).
Brightness: number property Sun light energy (best-effort).
ClockTime: number property Time of day 0-24; drives the sun elevation (best-effort).
FogColor: Color3 property Fog color (best-effort).
FogStart: number property Fog start distance; combined with FogEnd to derive density (best-effort).
FogEnd: number property Fog end distance; large values disable fog (best-effort).
GlobalShadows: bool property Toggles directional shadows (best-effort).
ReplicatedStorage

Shared container. Holds children parented into it in-memory, visible across scripts (no network replication).

Member Kind Description
Name: string property Container name.
ClassName: string property Always "ReplicatedStorage".
Parent: Instance? property Parent in the instance tree (settable).
FindFirstChild(name: string): Instance? method Finds a stored child by name (case-insensitive).
WaitForChild(name: string): Instance? method Best-effort: returns the child if present (no yielding wait).
GetChildren(): {Instance} method Returns the stored children.
RunService

Frame stepping events and run context queries.

Member Kind Description
Heartbeat: Event event Fires every frame with the frame delta (seconds).
RenderStepped: Event event Fires every frame before rendering (delta seconds).
Stepped: Event event Fires every frame (time, delta). Best-effort alias of Heartbeat.
IsClient(): bool method Always true in the client.
IsServer(): bool method Always false in the client.
IsStudio(): bool method Always false in the client.
UserInputService

Keyboard/mouse input (best-effort).

Member Kind Description
InputBegan: Event event Fires when an input begins. Handler receives an InputObject.
InputEnded: Event event Fires when an input ends. Handler receives an InputObject.
IsKeyDown(keyCode: string): bool method Returns whether the given KeyCode is currently held.
PlayerGui

The player's live on-screen UI, rendered from the place's StarterGui.

Member Kind Description
Name: string property Always "PlayerGui".
ClassName: string property Always "PlayerGui".
FindFirstChild(path: string): Instance? method Finds a rendered element by name, or by a slash-separated path.
WaitForChild(path: string): Instance? method Alias of FindFirstChild; does not yield.
GetChildren(): {Instance} method Returns the rendered ScreenGui roots.
Classes

Objects scripts are handed or create with Instance.new.

Instance

Base scriptable object. Instance.new("Part") maps onto a brick; other class names create generic tree nodes.

Member Kind Description
new(className: string): Instance function Constructs an instance of the given class name.
Name: string property Instance name.
ClassName: string property Class name of the instance.
Parent: Instance? property Parent in the instance tree (settable).
GetChildren(): {Instance} method Returns the direct children.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
WaitForChild(name: string): Instance? method Best-effort: returns the child if present (no yielding wait).
IsA(className: string): bool method Best-effort class check.
Destroy(): void method Detaches the instance from the tree (and removes a brick-backed part).
Value: any property Free-form value slot. Backs the *Value classes (IntValue, StringValue, Vector3Value, Color3Value) - but it is untyped and present on every generic instance, so nothing enforces that an IntValue holds a number. Not replicated: it is local to the script's own instance tree.
Brick

A brick or part in the world.

Member Kind Description
ID: number property Unique brick id.
Name: string property Brick name.
Position: Vector3 property World position (BH studs).
Scale: Vector3 property Size in studs.
Size: Vector3 property Alias of Scale.
Color: Color3 property Brick color.
Transparency: number property 0 opaque .. 1 fully transparent.
Material: string property Material name (see Enum.Material).
Collision: bool property Whether the brick is collidable.
CanCollide: bool property Alias of Collision with the same polarity.
Roughness: number property Surface roughness override 0-1. -1 inherits the Material's own profile.
Metalness: number property Metalness override 0-1. -1 inherits the Material's own profile.
Clickable: bool property Whether the brick raises OnClick.
Rotation: number property Yaw rotation in degrees.
ClassName: string property Always "Part" for brick-backed parts.
Parent: Instance? property Parent in the instance tree (settable; brick keeps rendering regardless).
OnClick: Event property Fires when a player clicks the brick (receives the player).
MouseClick: Event property Alias of OnClick.
Clicked: Event property Alias of OnClick. Was already implemented but undocumented here.
Touched: Event property Fires when the local player touches the brick (best-effort AABB).
GetChildren(): {Instance} method Returns instances parented to this brick.
FindFirstChild(name: string): Instance? method Finds a child by name (case-insensitive).
WaitForChild(name: string): Instance? method Best-effort: returns the child if present (no yielding wait).
IsA(className: string): bool method Best-effort class check. Inherited; ApiSurfaceProbe flagged it as exposed but undocumented.
Destroy(): void method Removes the brick from the world.
InputObject

The input passed to UserInputService.InputBegan and InputEnded. Best-effort: only the fields below are populated.

Member Kind Description
UserInputType: string property What produced the input - see Enum.UserInputType. "Keyboard" for keys, "MouseButton1"/"MouseButton2"/"MouseButton3" for clicks.
KeyCode: string property Key name for keyboard input, e.g. "Space". Empty for mouse input.
X: number property Cursor X for mouse input; 0 otherwise.
Y: number property Cursor Y for mouse input; 0 otherwise.
Player

A connected player.

Member Kind Description
Name: string property Display name.
NetID: number property Network id.
Score: number property Leaderboard score.
GetLeaderstat(name: string): string? method Read a replicated named stat. Server scripts publish stats with the hosted Player:SetLeaderstat API.
Health: number property Current health.
MaxHealth: number property Maximum health.
Position: Vector3 property Character position.
ParticleEmitter

A particle effect. Free-floating, or following a brick or a player. Emitters live in world space, so moving one leaves a trail rather than dragging its particles along.

Member Kind Description
Name: string property Emitter name. Local to the script; emitters are not in the instance tree.
ClassName: string property Always "ParticleEmitter".
Enabled: bool property Whether particles are being emitted. Default true. Emit() ignores this.
Rate: number property Particles per second, minimum 0. Default 20. The pool is capped at 4000 particles per emitter, so a very large Rate stops scaling rather than stalling the client.
Lifetime: number property Seconds each particle lives, clamped 0.05-60. Default 2.
Speed: number property Initial speed in studs/second. Default 8.
SpeedVariation: number property Random spread of the initial speed as a fraction of Speed, clamped 0-1. Default 0.2.
SpreadAngle: number property Cone half-angle in degrees around Direction, clamped 0-180. Default 20; 0 is a straight line.
Direction: Vector3 property Emission direction, normalised on assignment. A zero vector falls back to up.
Acceleration: Vector3 property Constant acceleration in studs/s^2. Gravity is not applied unless you set it here.
Position: Vector3 property World position in the same studs as brick.Position. Ignored while attached to a brick or player.
Offset: Vector3 property Extra offset applied on top of whatever the emitter is attached to.
Size: number property Particle size in studs, minimum 0.01. Assign a NumberSequence instead for size over lifetime. Reading it always gives the number, never the sequence.
Color: Color3 property Flat tint, or assign a ColorSequence for colour over lifetime. Reading it always gives a Color3.
Transparency: number property 0 opaque .. 1 invisible, or assign a NumberSequence for transparency over lifetime. Reading it always gives the number.
Texture: string property res:// path or http(s) URL of the particle sprite. A value that fails to load logs a warning and keeps the default sprite.
Parent: Instance? property Assign a brick or player to follow it, or nil to leave it where it is. Write-only in practice: reading it always gives nil.
Emit(count: number): void method Emits a one-off burst of the given count, whatever Enabled is set to.
AttachToBrick(brick: Instance|number): void method Follows a brick. Takes a brick or a brick id.
AttachToPlayer(player: Instance|number): void method Follows a player's character. Takes a player or a net id.
AttachToWorld(position: Vector3?): void method Detaches and pins the emitter to a fixed position, defaulting to where it currently is.
IsA(className: string): bool method True for "ParticleEmitter" or "Instance".
Destroy(): void method Removes the emitter. A proxy kept after this is inert, not dangerous.
ScreenGui

A full-screen layer. Parent one to PlayerGui, then parent elements to it. Always fills the viewport, so it has no Position/Size of its own.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Enabled: bool property Whether this screen draws. The same flag as Visible.
Frame

A rectangular container.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
BackgroundColor3: Color3 property Background colour.
BackgroundColor: Color3 property Alias of BackgroundColor3, under the name the published-GUI JSON uses.
BackgroundTransparency: number property 0 opaque .. 1 invisible.
TextLabel

Non-interactive text.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
BackgroundColor3: Color3 property Background colour.
BackgroundColor: Color3 property Alias of BackgroundColor3, under the name the published-GUI JSON uses.
BackgroundTransparency: number property 0 opaque .. 1 invisible.
Text: string property Displayed text.
TextColor3: Color3 property Text colour.
TextColor: Color3 property Alias of TextColor3, under the name the published-GUI JSON uses.
TextSize: number property Font size in pixels, clamped 1-100. Ignored while TextScaled is on.
TextScaled: bool property Shrink the font to fit the element's box. Recomputed on every relayout.
TextButton

Clickable text button.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
BackgroundColor3: Color3 property Background colour.
BackgroundColor: Color3 property Alias of BackgroundColor3, under the name the published-GUI JSON uses.
BackgroundTransparency: number property 0 opaque .. 1 invisible.
Text: string property Displayed text.
TextColor3: Color3 property Text colour.
TextColor: Color3 property Alias of TextColor3, under the name the published-GUI JSON uses.
TextSize: number property Font size in pixels, clamped 1-100. Ignored while TextScaled is on.
TextScaled: bool property Shrink the font to fit the element's box. Recomputed on every relayout.
MouseButton1Click: Event event Fires when the button is activated. :Connect(fn), :Once(fn) or :Wait().
Activated: Event event Alias of MouseButton1Click.
ImageLabel

Non-interactive image. Drawn by a node with no background stylebox, so BackgroundColor3 would be inert and is deliberately not offered.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
Image: string property Image URL, fetched asynchronously (PNG/JPG/WebP). A grey placeholder shows while it loads and stays if the fetch fails.
ImageButton

Clickable image. Same lack of a background as ImageLabel.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
Image: string property Image URL, fetched asynchronously (PNG/JPG/WebP). A grey placeholder shows while it loads and stays if the fetch fails.
MouseButton1Click: Event event Fires when the button is activated. :Connect(fn), :Once(fn) or :Wait().
Activated: Event event Alias of MouseButton1Click.
TextBox

Editable single-line text field.

Member Kind Description
Name: string property Element name. Also the key FindFirstChild matches on.
ClassName: string property Read-only class name.
Parent: Instance? property Assign PlayerGui for a ScreenGui, another element for anything else, nil to detach. A non-ScreenGui assigned to PlayerGui is refused and left detached.
Visible: bool property Whether the element draws.
ZIndex: number property Draw order among siblings, -4096..4096.
FindFirstChild(name: string): Instance? method Finds a direct child by name (case-insensitive).
FindFirstChildOfClass(className: string): Instance? method Finds the first direct child of the given class (case-insensitive).
WaitForChild(name: string): Instance? method Alias of FindFirstChild; does not yield. Studio's playtest version really does yield, so a script that relies on waiting behaves differently there.
GetChildren(): {Instance} method Returns the direct children.
GetFullName(): string method Dotted path from PlayerGui, e.g. "PlayerGui.MainGui.PlayButton". Studio names the same element from StarterGui.
IsA(className: string): bool method True for this element's own class, "GuiObject", or "Instance".
Destroy(): void method Removes the element and everything under it.
Position: UDim2 property Position within the parent: scale of the parent's size plus a pixel offset, per axis.
Size: UDim2 property Size: scale of the parent's size plus a pixel offset, per axis.
AnchorPoint: Vector2 property Point (0-1 on each axis) that Position places. Default 0,0 - the top-left corner.
MouseEnter: Event event Fires when the cursor enters the element. Connecting or waiting on this is what makes the element take part in mouse picking at all - until something listens, clicks and camera movement pass straight through it to the world behind.
MouseLeave: Event event Fires when the cursor leaves the element. Same opt-in as MouseEnter.
BackgroundColor3: Color3 property Background colour.
BackgroundColor: Color3 property Alias of BackgroundColor3, under the name the published-GUI JSON uses.
BackgroundTransparency: number property 0 opaque .. 1 invisible.
Text: string property Displayed text.
TextColor3: Color3 property Text colour.
TextColor: Color3 property Alias of TextColor3, under the name the published-GUI JSON uses.
TextSize: number property Font size in pixels, clamped 1-100. Ignored while TextScaled is on.
TextScaled: bool property Shrink the font to fit the element's box. Recomputed on every relayout.
FocusLost: Event event Fires when the box loses focus. The handler receives false because the underlying signal does not identify what took focus away.
Datatypes

Value types with their own constructors.

Vector2

2D vector.

Member Kind Description
new(x: number?, y: number?): Vector2 constructor Creates a Vector2.
X: number property X component.
Y: number property Y component.
Magnitude: number property Length of the vector.
Vector3

3D vector.

Member Kind Description
new(x: number?, y: number?, z: number?): Vector3 constructor Creates a Vector3.
X: number property X component.
Y: number property Y component.
Z: number property Z component.
Magnitude: number property Length of the vector.
Dot(other: Vector3): number method Dot product with another Vector3.
Color3

RGB color with 0-1 components.

Member Kind Description
new(r: number?, g: number?, b: number?): Color3 constructor Creates a Color3 from 0-1 components.
fromRGB(r: number, g: number, b: number): Color3 constructor Creates a Color3 from 0-255 components.
R: number property Red 0-1.
G: number property Green 0-1.
B: number property Blue 0-1.
CFrame

Coordinate frame with position and rotation.

Member Kind Description
new(x: number?, y: number?, z: number?): CFrame constructor Creates a CFrame at the given position.
Angles(rx: number, ry: number, rz: number): CFrame constructor Creates a rotation-only CFrame from XYZ Euler angles in radians (best-effort).
X: number property X position.
Y: number property Y position.
Z: number property Z position.
Position: Vector3 property Position component.
p: Vector3 property Position component (legacy alias).
LookVector: Vector3 property Forward direction (-Z) of the rotation.
RightVector: Vector3 property Right direction (+X) of the rotation.
UpVector: Vector3 property Up direction (+Y) of the rotation.
Inverse(): CFrame method Returns the inverse CFrame.
ToWorldSpace(other: CFrame): CFrame method Composes this CFrame with another: this * other (best-effort).
ToObjectSpace(other: CFrame): CFrame method Expresses another CFrame relative to this one (best-effort).
UDim2

2D UI coordinate of {scale, offset} pairs.

Member Kind Description
new(xScale: number, xOffset: number, yScale: number, yOffset: number): UDim2 constructor Creates a UDim2.
X: UDim property Horizontal {Scale, Offset}.
Y: UDim property Vertical {Scale, Offset}.
UDim

One axis of a UDim2: a fraction of the parent plus a pixel offset. Read off UDim2.X or UDim2.Y - there is no UDim.new.

Member Kind Description
Scale: number property Fraction of the parent's size on this axis.
Offset: number property Pixels added on top of the scaled amount.
NumberSequence

A number over a particle's 0..1 lifetime. Assign to ParticleEmitter.Size or .Transparency.

Member Kind Description
new(value: number|table, endValue: number?): NumberSequence constructor Constant value, or a start/end pair, or a table: keypoints, {time, value} pairs, or plain numbers spaced evenly. An unrecognised argument yields an empty sequence, which every consumer treats as "no sequence".
NumberSequenceKeypoint

One point of a NumberSequence.

Member Kind Description
new(time: number, value: number): NumberSequenceKeypoint constructor Creates a keypoint at time 0-1.
Time: number property Position along the lifetime, 0-1.
Value: number property Value at that time.
ColorSequence

A colour over a particle's 0..1 lifetime. Assign to ParticleEmitter.Color.

Member Kind Description
new(color: Color3|table, endColor: Color3?): ColorSequence constructor Constant colour, or a start/end pair, or a table of keypoints, {time, Color3} pairs, or plain Color3s spaced evenly.
ColorSequenceKeypoint

One point of a ColorSequence.

Member Kind Description
new(time: number, color: Color3): ColorSequenceKeypoint constructor Creates a keypoint at time 0-1.
Time: number property Position along the lifetime, 0-1.
Value: Color3 property Colour at that time.
Enums

Reached as Enum.Name.Value. These are plain strings and numbers rather than EnumItem objects, and the value shown is what a property actually receives — so brick.Material == Enum.Material.Granite compares equal to the stored string.

Enum.Material

Name Value
Enum.Material.Plastic "plastic"
Enum.Material.SmoothPlastic "smoothplastic"
Enum.Material.Neon "neon"
Enum.Material.Wood "wood"
Enum.Material.WoodPlanks "woodplanks"
Enum.Material.Marble "marble"
Enum.Material.Basalt "basalt"
Enum.Material.Slate "slate"
Enum.Material.CrackedLava "crackedlava"
Enum.Material.Concrete "concrete"
Enum.Material.Limestone "limestone"
Enum.Material.Granite "granite"
Enum.Material.Pavement "pavement"
Enum.Material.Brick "brick"
Enum.Material.Pebble "pebble"
Enum.Material.Cobblestone "cobblestone"
Enum.Material.Rock "rock"
Enum.Material.Sandstone "sandstone"
Enum.Material.CorrodedMetal "corrodedmetal"
Enum.Material.DiamondPlate "diamondplate"
Enum.Material.Foil "foil"
Enum.Material.Metal "metal"
Enum.Material.Grass "grass"
Enum.Material.LeafyGrass "leafygrass"
Enum.Material.Sand "sand"
Enum.Material.Fabric "fabric"
Enum.Material.Snow "snow"
Enum.Material.Mud "mud"
Enum.Material.Ground "ground"
Enum.Material.Asphalt "asphalt"
Enum.Material.Salt "salt"
Enum.Material.Ice "ice"
Enum.Material.Glacier "glacier"
Enum.Material.Glass "glass"
Enum.Material.ForceField "forcefield"
Enum.Material.Air "air"
Enum.Material.Water "water"
Enum.Material.Cardboard "cardboard"
Enum.Material.Carpet "carpet"
Enum.Material.CeramicTiles "ceramictiles"
Enum.Material.ClayRoofTiles "clayrooftiles"
Enum.Material.RoofShingles "roofshingles"
Enum.Material.Leather "leather"
Enum.Material.Plaster "plaster"
Enum.Material.Rubber "rubber"

Enum.Shape

Name Value
Enum.Shape.Cube 0
Enum.Shape.Slope 1
Enum.Shape.Wedge 2
Enum.Shape.Spawnpoint 3
Enum.Shape.Arch 4
Enum.Shape.Dome 5
Enum.Shape.Bars 6
Enum.Shape.Flag 7
Enum.Shape.Pole 8
Enum.Shape.Cylinder 9
Enum.Shape.RoundSlope 10
Enum.Shape.Vent 11
Enum.Shape.Sphere 12

Enum.PartType

Name Value
Enum.PartType.Block 0
Enum.PartType.Wedge 2
Enum.PartType.Cylinder 9

Enum.UserInputType

Name Value
Enum.UserInputType.MouseButton1 "MouseButton1"
Enum.UserInputType.MouseButton2 "MouseButton2"
Enum.UserInputType.MouseButton3 "MouseButton3"
Enum.UserInputType.MouseMovement "MouseMovement"
Enum.UserInputType.MouseWheel "MouseWheel"
Enum.UserInputType.Keyboard "Keyboard"
Enum.UserInputType.Touch "Touch"

Enum.UserInputState

Name Value
Enum.UserInputState.Begin "Begin"
Enum.UserInputState.End "End"
Enum.UserInputState.Change "Change"

Enum.KeyCode

Name Value
Enum.KeyCode.A "A"
Enum.KeyCode.B "B"
Enum.KeyCode.C "C"
Enum.KeyCode.D "D"
Enum.KeyCode.E "E"
Enum.KeyCode.F "F"
Enum.KeyCode.G "G"
Enum.KeyCode.H "H"
Enum.KeyCode.I "I"
Enum.KeyCode.J "J"
Enum.KeyCode.K "K"
Enum.KeyCode.L "L"
Enum.KeyCode.M "M"
Enum.KeyCode.N "N"
Enum.KeyCode.O "O"
Enum.KeyCode.P "P"
Enum.KeyCode.Q "Q"
Enum.KeyCode.R "R"
Enum.KeyCode.S "S"
Enum.KeyCode.T "T"
Enum.KeyCode.U "U"
Enum.KeyCode.V "V"
Enum.KeyCode.W "W"
Enum.KeyCode.X "X"
Enum.KeyCode.Y "Y"
Enum.KeyCode.Z "Z"
Enum.KeyCode.Space "Space"
Enum.KeyCode.Return "Return"
Enum.KeyCode.Escape "Escape"
Enum.KeyCode.LeftShift "LeftShift"
Enum.KeyCode.LeftControl "LeftControl"
Enum.KeyCode.Tab "Tab"
Enum.KeyCode.Up "Up"
Enum.KeyCode.Down "Down"
Enum.KeyCode.Left "Left"
Enum.KeyCode.Right "Right"
Enum.KeyCode.Zero "0"
Enum.KeyCode.One "1"
Enum.KeyCode.Two "2"
Enum.KeyCode.Three "3"
Enum.KeyCode.Four "4"
Enum.KeyCode.Five "5"
Enum.KeyCode.Six "6"
Enum.KeyCode.Seven "7"
Enum.KeyCode.Eight "8"
Enum.KeyCode.Nine "9"

Enum.Font

Name Value
Enum.Font.Legacy "Legacy"
Enum.Font.Arial "Arial"
Enum.Font.ArialBold "ArialBold"
Enum.Font.SourceSans "SourceSans"
Enum.Font.SourceSansBold "SourceSansBold"
Enum.Font.SourceSansLight "SourceSansLight"
Enum.Font.SourceSansItalic "SourceSansItalic"