Skip to main content
Access to runtime environments and garbage-collected objects.

Available functions

filtergc

Searches live garbage-collected tables or functions that match the supplied filters. filterType must be “table” or “function”. options must be a table.

getgc

Returns an array table of live Luau garbage-collected objects visible to the API. Functions and userdata-like objects are included by default. Tables are included only when includeTables is true. get_gc_objects is an alias.

getgenv

Returns the current executor environment table by pushing LUA_ENVIRONINDEX. The function takes no arguments, returns exactly one value, and has no registered alias. Repository call-sites use the returned table to read and write shared executor globals such as __siApiCache and saveinstance.

getrenv

Returns the Roblox global environment table. The function takes no arguments and returns exactly one value.

getscriptglobals

Returns a new table containing the current LUA_GLOBALSINDEX values for _G and shared. The function takes no arguments, creates a fresh table, assigns _G from LUA_GLOBALSINDEX._G and shared from LUA_GLOBALSINDEX.shared, and returns exactly one value. It does not return the full global table, and no alias is registered for getscriptglobals.

gettenv

Returns the environment table stored on a Luau thread. getstateenv is an alias.

setclipboard

Writes one value to the Windows system clipboard as text. The value is converted to a string. The function returns no status value, whether the clipboard write succeeds or fails. toclipboard is an alias.

setrbxclipboard

Writes a required string to the Windows clipboard using Roblox Studio clipboard data format. The function returns no status value, whether the clipboard write succeeds or fails.