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
| Name | Value | Description |
|---|---|---|
| Local | 0 | A local variable declared in the current function scope. |
| Upvalue | 1 | A variable captured from an enclosing function scope. |
| Global | 2 | A global variable. |
Local
A local variable declared in the current function scope.
| Field | Value |
|---|---|
| value | 0 |
Upvalue
A variable captured from an enclosing function scope.
| Field | Value |
|---|---|
| value | 1 |
Global
A global variable.
| Field | Value |
|---|---|
| value | 2 |