compareinstances

Compares instance identities.

Syntax

Signature
compareinstances(First: any, Second: any) -> boolean

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
FirstanyFirst wrapper or reference proxy.
SecondanySecond wrapper or reference proxy.

Returns

TypeDescription
booleanWhether the supported wrapper identities match.

Notes

Table reference proxies are unwrapped first. Tables match when they are the same table or have the same valid numeric string _id. Supported userdata wrappers are compared by their stored native pointer.

Example

Luau
local Result = compareinstances(game:GetService("Players"), game:GetService("Players"))
print(Result)