Chuyển đến nội dung chính
Truy cập vào môi trường thời gian chạy và các đối tượng được thu thập rác.

Hàm có sẵn

filtergc

Tìm live garbage-collected tables hoặc functions khớp với filters đã cung cấp. filterType phải là “table” hoặc “function”. options phải là 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

Tra ve current executor environment table bang cach pushing LUA_ENVIRONINDEX. Function khong nhan arguments, tra ve exactly one value, va khong co registered alias. Call-sites trong repository dung returned table de doc va ghi shared executor globals nhu __siApiCache va saveinstance.

getrenv

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

getscriptglobals

Tra ve new table chua current LUA_GLOBALSINDEX values cho _G va shared. Function khong nhan arguments, tao fresh table, gan _G tu LUA_GLOBALSINDEX._G va shared tu LUA_GLOBALSINDEX.shared, va tra ve exactly one value. No khong tra ve full global table, va khong co alias duoc dang ky cho 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.