Category
Scripts
Script, bytecode, and environment queries.Category guide
Overview
Use this overview to understand the category before opening a specific function.- See what this group of functions is meant to solve.
- Compare function names and descriptions in one table.
- Open a function for syntax, arguments, returns, and examples.
Scripts
Available functions
| Function | Description |
|---|---|
decompile | Decompiles a Roblox script and returns the generated source text when bytecode is available. |
dumpstring | Returns the decompressed bytecode string for a Roblox script object. |
getcallingscript | Returns the Script Instance associated with the current Luau thread, or nil when no script is associated with it. |
getinstancesbyclass | Returns instances from the Instance cache table whose ClassName field exactly matches the requested string. |
getloadedmodules | Returns a new array table containing live entries from loaded module list. |
getmenv | Returns the environment table associated with a ModuleScript. |
getreferencedby | Returns cached Instance values whose supported reference properties point to the provided Instance. |
getrunningscripts | Returns a new array table of unique script Instances taken from live Lua threads. |
getscriptbytecode | Returns the decompressed bytecode string for a Roblox script object. |
getscriptclosure | Loads the stored bytecode for a supported Roblox script Instance and returns it as a Lua closure. |
getscripthash | Returns an uppercase SHA384 hex digest for the stored bytecode string of a Roblox script object. |
getscripts | Returns script object values currently present in the Instance cache. |
getscriptthread | Returns the Lua thread associated with a script object when Real can find one. |
getsenv | Returns the environment table associated with a LocalScript, Script, or ModuleScript. |
loadstring | Compiles a Luau source string and returns the loaded function. |