Skip to content
DiagnosticsOverviewNew · 0.744

getscriptexecutioncontext

Describe the execution-context category used by diagnostics.

Details#

Classifies a script by its class name: LocalScript → Client, ModuleScript → Module, Script → Server, CoreScript → Core; other values yield Unknown. This does not prove where a script is actively running.

Examples#

Example

Luau
local ownScript = Instance.new("ModuleScript")
print(getscriptexecutioncontext(ownScript)) -- Module
ownScript:Destroy()