Syntax
setscriptable(instance: userdata, property: string, value: boolean): booleanArguments
| Name | Type | Description |
|---|---|---|
instance | userdata | Roblox instance to inspect or update. |
property | string | Property name to read or change. |
value | boolean | New value to write. |
Returns
| Name | Type | Description |
|---|---|---|
previousState | boolean | Previous scriptable state before the change. |
Description
Changes whether a property is scriptable and returns the previous state.
Call it with 3 parameter(s): instance, property, value. The argument table explains which values are required and which ones only refine the behavior.
It returns previousState (boolean). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = setscriptable(game, "example", true)
print(result)