ScriptContext¶
A service that manages the execution of all BaseScript objects.
Description¶
This service controls all BaseScript objects. Most of the properties and methods of this service are locked for internal use.
Inheritance¶
Object → Instance → ScriptContext
Nova inheritance: Instance → ScriptContext
Properties¶
ScriptsDisabled Supported Property
Methods¶
AddCoreScript Supported Function
No description available.
RobloxScriptSecurityAddCoreScriptLocal Supported Function
No description available.
RobloxScriptSecurityAddStarterScript Supported Function
No description available.
LocalUserSecurityGetHeapStats Supported Function
No description available.
RobloxScriptSecurityGetScriptStats Supported Function
No description available.
RobloxScriptSecuritySetCollectScriptStats Supported Function
No description available.
RobloxScriptSecuritySetTimeout Supported Function Limits how long a script is allowed to run without yielding.
Limits how long a script is allowed to run without yielding.
Sets the watchdog time limit that the engine applies to running scripts.
The value becomes the per-resumption execution budget: if a thread runs
for longer than seconds since it was last resumed without yielding, the
watchdog aborts it with the runtime error
Script timeout: exhausted allowed execution time.
The timeout defaults to 0, which disables the watchdog so that scripts
may run without any time limit. Call this method with a positive value to
enable enforcement, or pass 0 to turn it back off.
PluginSecurityEvents¶
CamelCaseViolation Supported Event
No description available.
RobloxScriptSecurityError Supported Event Fired when an error occurs.
Fired when an error occurs.
Fires when an unhandled error occurs while running a script, reporting the
error to any listening code. The engine raises this event from its
error-reporting path when a thread terminates with an error, passing the
error message, a formatted stackTrace string, and the script that
was running.
This event does not fire for errors raised by the watchdog when a script exceeds its execution-time limit (see ScriptContext.SetTimeout()).
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
7 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's ScriptContext class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.
Methods¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
CompressLuaApp |
ScriptContext:CompressLuaApp(): null |
Not yet | — | RobloxScriptSecurity |
EnableCoverage |
ScriptContext:EnableCoverage(instance: Instance): null |
Not yet | Marks an instance and its descendant scripts for code-coverage tracking. Requires PluginOrOpenCloud security. |
— |
GetCoverageStats |
ScriptContext:GetCoverageStats(): Array |
Not yet | Returns code-coverage statistics for scripts marked by EnableCoverage(). Requires PluginOrOpenCloud security. |
— |
GetLuauHeapInstanceReferenceReport |
ScriptContext:GetLuauHeapInstanceReferenceReport(target: string): Dictionary |
Not yet | — | CustomLuaState, RobloxScriptSecurity |
GetLuauHeapMemoryReport |
ScriptContext:GetLuauHeapMemoryReport(target: string): Dictionary |
Not yet | — | CustomLuaState, RobloxScriptSecurity |
ReportLuaRequireCount |
ScriptContext:ReportLuaRequireCount(): null |
Not yet | — | RobloxScriptSecurity |
Events¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
ErrorDetailed |
ErrorDetailed(message: string, stackTrace: string, script: Instance, details: string, securityLevel: int, messageId: string) |
Not yet | — | RobloxScriptSecurity |
Roblox reference: ScriptContext
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.