Skip to main content
Checks whether a and b are the same Roblox Instance.
Calling cloneref on an Instance gives you a separate Lua reference. Roblox treats both as the same Instance, but using the == operator compares the objects themselves - so original == cloneref(original) will return false. compareinstances checks the Roblox Instances behind them instead. Most commonly used after cloneref to confirm a clone and its original are the same Roblox Instance.

Parameters

Returns

boolean - true when both arguments are the same Roblox Instance; otherwise false.

Aliases

  • checkinst

Example

Bypasses standard Lua == reference inequality for cloned references.