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

# isscriptable

> 检查 Instance 上 Roblox property 的 scriptable flag。function 会先返回同一 instance reference 和 property name 的 cached scriptable value。如果 cache miss，则通过 Roblox property metadata 和 Instance class descriptor 解析 property name。如果 descriptor 不存在，或解析到的 field 缺失，或不是 property entry，function 返回 nil。找到 property entry 时，function 读取 scriptable state，把该值保存到该 instance 和 property 的 scriptable override cache，然后返回 boolean。function 不会更改 scriptable flag。

<div className="real-function-page">
  ```lua theme={null}
  isscriptable(instance: Instance, property: string): boolean | nil
  ```

  ## 参数

  <ParamField path={"instance"} type={"Instance"} required>
    要检查 property scriptable state 的 Instance object。
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    通过 Roblox property metadata 和 Instance class descriptor 解析的 property name。
  </ParamField>

  ## 返回值

  <ResponseField name={"scriptable"} type={"boolean | nil"}>
    cached 或当前的 scriptable state 值；如果 property descriptor/field 缺失或不是 property entry，则为 nil。
  </ResponseField>

  ## 示例

  Check whether a property is scriptable on an Instance.

  ```lua theme={null}
  local scriptable = isscriptable(workspace, "Name")
  print(scriptable)
  ```
</div>
