Skip to main content

System

System-level APIs and environment constraints.


Listener

Callback that observes changes on an object.

Usage

Listeners are registered via addListener methods on various objects:

property:addListener(function()
print("Value changed to", property.value)
end)

See Also: Property, Input


Output

Represents a typed output value from a script.

Usage

Outputs allow scripts to expose values to other parts of the system:

export type MyScript = {
result: Output<number>,
}

EnumValues

Collection of enum values.

Methods

Length (#)

Returns the number of enum values.

local count = #enumValues

See Also: PropertyEnum


Sandbox Limitations

Not available in Rive's Luau environment:

LibraryStatus
ioNot available
osPartial (os.clock(), os.time(), os.difftime() only)
debugNot available
packageNot available
loadfile, dofile, loadstringNot available

The __gc metamethod is also disabled.

Next Steps