compareinstances

his is primarily used for instances which have been cloneref'd, where the normal equality check with == fails.

function compareinstances(object1: Instance, object2: Instance): boolean

Parameters

  • object1: The first instance to compare

  • object2: The second instance to compare against


Example

print(compareinstances(game, game))              -- true
print(compareinstances(game, workspace))         -- false
print(compareinstances(game, cloneref(game)))    -- true
print(game == cloneref(game))                    -- false

Last updated