Reflection

isscriptable

Checks the scriptable flag for a Roblox property on an Instance.

Syntax

isscriptable(instance: Instance, property: string): boolean | nil

Arguments

NameTypeDescription
instanceInstanceInstance object whose property scriptable state should be checked.
propertystringProperty name resolved with Roblox property metadata and the Instance class descriptor.

Returns

NameTypeDescription
scriptableboolean | nilCached or current scriptable state value, or nil when the property descriptor/field is missing or is not a property entry.

Description

Checks the scriptable flag for a Roblox property on an Instance. The function first returns a cached scriptable value when one exists for the same instance reference and property name. On a cache miss, the property name is resolved with Roblox property metadata and the Instance class descriptor. If no descriptor exists, or the resolved field is missing or is not a property entry, the function returns nil. When a property entry is found, it reads scriptable state, stores that value in the scriptable override cache for the instance and property, and returns the boolean. The function does not change the scriptable flag.

Call it with 2 parameter(s): instance, property. The argument table explains which values are required and which ones only refine the behavior.

It returns scriptable (boolean | nil). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Check whether a property is scriptable on an Instance.

local scriptable = isscriptable(workspace, "Name")
print(scriptable)