setscriptable
Sets the scriptable flag.
Syntax
setscriptable(instance: Instance, property: string, flag: any) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
instance | Instance | The Instance to read from or modify. |
property | string | The property name to access. |
flag | any | The flag value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
setscriptable is part of the Reflection library. Reflection walks Roblox's property metadata to read or write values that are normally hidden from scripts.
The change is applied directly to the live target, so later reads observe the updated value.
The aliases set_scriptable resolve to the same implementation.
Example
setscriptable(workspace, "Name", true)
Notes
- Aliases:
set_scriptable. - Reflection reads live property metadata; hidden-property writes can desynchronise client state.