1 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

ScriptVariableScope

Used in Datatype.ScriptVariable to classify the scope of a variable returned by ScriptDebuggerService:GetRootVariables() or ScriptDebuggerService:GetVariables(). Children of a variable inherit the parent's scope.

Items

NameValueDescription
Local0A local variable declared in the current function scope.
Upvalue1A variable captured from an enclosing function scope.
Global2A global variable.

Local

A local variable declared in the current function scope.

FieldValue
value0

Upvalue

A variable captured from an enclosing function scope.

FieldValue
value1

Global

A global variable.

FieldValue
value2