API reference

Compatibility, conventions and a map of the libraries this reference covers.

The Lynx API gives scripts access to functions for working with closures, environments, Instances, files, networking, drawing and more. Each reference page explains the available functions, their arguments, return values and examples.

Calling conventions

Signatures use Luau types. A question mark marks an optional argument or a value that may be nil. Defaults appear beside optional arguments, and commas separate multiple return values. A Yields badge marks a call that may pause its thread.

Function names and aliases are case-sensitive. Use pcall when an operation may fail, and check diagnostic return values from functions such as loadstring and shader compilation.

local name, version = identifyexecutor()
print(name, version)
local compiled, reason = loadstring("return 6 * 7", "=example")
if compiled then
print(compiled())
else
warn(reason)
end

Libraries

Working with results

Some functions return a snapshot rather than a live list. Keep only the values you need, disconnect event handlers when finished, and remove drawings or other resources you create.