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

> Membandingkan nilai reference Instance yang disimpan dalam dua nilai Instance object.

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

  ## Argumen

  <ParamField path={"first"} type={"Instance"} required>
    Instance object pertama untuk dibandingkan.
  </ParamField>

  <ParamField path={"second"} type={"Instance"} required>
    Instance object kedua untuk dibandingkan.
  </ParamField>

  ## Return

  <ResponseField name={"equal"} type={"boolean"}>
    True saat kedua nilai Instance object berisi nilai reference yang sama.
  </ResponseField>

  ## Contoh

  Bandingkan nilai reference Instance yang disimpan dalam dua nilai Instance object.

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

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