Aliases

  • getscriptenv

Arguments

LocalScript | ModuleScript | Script
required
The script Instance to inspect.

Returns

table?
The matching script thread’s globals, or nil when unavailable.
Nil for unsupported classes, no matching thread, or another main VM. A ModuleScript does not necessarily retain a discoverable thread. Related types: Scripts types & behavior.

Example