Scripts & runtimeOverview
getscriptclosure
Represents access to a script's callable representation.
Aliases
getscriptfunctionDetails#
Obtains a callable representation from a script's available compiled data. Obtaining it is distinct from executing it, and does not reproduce all captured live state. Unavailable bytecode may cause an error or no callable result.
Examples#
Example
local ownScript = Instance.new("LocalScript")
local ok, closure = pcall(getscriptclosure, ownScript)
print(ok, type(closure))
ownScript:Destroy()