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

# compareinstances

> 2 つの Instance object 値に保存されている内部 Instance ポインタ値を比較します。

<div className="real-function-page">
  ```lua theme={null}
  compareinstances(first: Instance, second: Instance): boolean
  ```

  ## 引数

  <ParamField path={"first"} type={"Instance"} required>
    比較する 1 つ目の Instance object。
  </ParamField>

  <ParamField path={"second"} type={"Instance"} required>
    比較する 2 つ目の Instance object。
  </ParamField>

  ## 戻り値

  <ResponseField name={"equal"} type={"boolean"}>
    両方の Instance object 値が同じ内部ポインタ値を含む場合は True。
  </ResponseField>

  ## 例

  2 つの Instance object 値に保存されている内部 Instance ポインタ値を比較します。

  ```lua theme={null}
  local Players = game:GetService("Players")
  local ReplicatedStorage = game:GetService("ReplicatedStorage")

  print(compareinstances(Players, Players))
  print(compareinstances(Players, ReplicatedStorage))
  ```
</div>
