> ## 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.

# getcallbackvalue

> Instance 上の callback property に保存された Lua callback function を読み取ります。最初の引数は Instance object、2 番目の引数は string property name である必要があります。instance reference は有効である必要があります。property name は Roblox property metadata で解決され、型が LUA_CALLBACK の property を指す必要があります。property descriptor がない、property が LUA_CALLBACK ではない、callback field offset がない、callback が保存されていない、LiveLuaRef がない、callback が別の Lua global state に属する、または参照された値が function ではない場合、この function は nil を返します。最初の callback slot に callback がない場合は async callback field fallback も確認します。この function は property を更新しません。

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

  ## エイリアス

  * `getcallbackmember`

  ## 引数

  <ParamField path={"instance"} type={"Instance"} required>
    callback property を検査する Instance object。Invalid Instance values は argument error を発生させます。
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    Roblox property metadata で解決される string property name。LUA\_CALLBACK properties だけが function を返せます。
  </ParamField>

  ## 戻り値

  <ResponseField name={"callback"} type={"function | nil"}>
    callback property に保存された Lua function、または function が読み取り可能な function を解決できない場合は nil。
  </ResponseField>

  ## 例

  BindableFunction.OnInvoke に保存された callback function を読み取ります。

  ```lua theme={null}
  local bindable = Instance.new("BindableFunction")
  bindable.OnInvoke = function(value)
      return value * 2
  end

  local callback = getcallbackvalue(bindable, "OnInvoke")
  if callback then
      print(callback(21))
  end
  ```
</div>
