访问运行时环境和垃圾收集对象。
可用函数
filtergc
搜索匹配所提供 filters 的 live garbage-collected tables 或 functions。filterType 必须是 “table” 或 “function”。options 必须是 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
通过 pushing LUA_ENVIRONINDEX 返回 current executor environment table。该 function 不接受 arguments,返回 exactly one value,并且没有 registered alias。repository 中的 call-sites 使用 returned table 读取和写入 shared executor globals,例如 __siApiCache 和 saveinstance。
getrenv
Returns the Roblox global environment table. The function takes no arguments and returns exactly one value.
getscriptglobals
返回包含 _G 和 shared 的 current LUA_GLOBALSINDEX values 的 new table。该 function 不接受 arguments,会创建 fresh table,把 _G 从 LUA_GLOBALSINDEX._G 赋值,把 shared 从 LUA_GLOBALSINDEX.shared 赋值,并返回 exactly one value。它不会返回 full global table,getscriptglobals 没有注册 alias。
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.