> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# setscriptable

Sets the scriptable state of a property on a Roblox instance.

```luau theme={null}
setscriptable(instance: Instance, property: string, scriptable: boolean): boolean
```

## Parameters

| Parameter    | Type       | Description                                                         |
| ------------ | ---------- | ------------------------------------------------------------------- |
| `instance`   | `Instance` | The target Instance.                                                |
| `property`   | `string`   | The property name.                                                  |
| `scriptable` | `boolean`  | Whether to make it scriptable (`true`) or non-scriptable (`false`). |

## Returns

`boolean` - The previous scriptable state of the property.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  local wasScriptable = setscriptable(fireInstance, "size_xml", true)
  assert(wasScriptable == false)
  ```

  ```luau Example 2 theme={null}
  setscriptable(game:GetService("Lighting"), "Technology", true)
  ```
</CodeGroup>

<Tip>
  Allows standard Lua code to index and write to properties that are normally hidden.
</Tip>
