Syntax
compareinstances(source: Instance, replacement: Instance): booleanArguments
| Name | Type | Description |
|---|---|---|
source | Instance | First instance reference. |
replacement | Instance | Second instance reference. |
Returns
| Name | Type | Description |
|---|---|---|
equal | boolean | True when both references point to the same instance. |
Description
Compares two instance references and returns true when they point to the same instance.
Call it with 2 parameter(s): source, replacement. The argument table explains which values are required and which ones only refine the behavior.
It returns equal (boolean). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = compareinstances(game, game)
print(result)