Skip to content
Saiko

setscriptable

Marks a hidden property as scriptable so ordinary indexing works, returning the previous state.

Signature

luau
setscriptable(instance: Instance, property: string, scriptable: boolean): boolean

Parameters

instanceInstance

The instance to change.

propertystring

The property name.

scriptableboolean

Whether the property should be scriptable.

Returns

boolean

Example

luau
local was = setscriptable(workspace, "PhysicsSteppingMethod", true)
print(workspace.PhysicsSteppingMethod) -- plain indexing works now
setscriptable(workspace, "PhysicsSteppingMethod", was) -- put it back