InstancesOverview
cloneref
Creates another reference to an existing object.
Aliases
clonereferenceDetails#
Creates a separate Instance reference to the same underlying object. It does not duplicate the object's children or properties. Changes through either reference affect the same object; compareinstances compares underlying identity.
Examples#
Example
local part = Instance.new("Part")
local ref = cloneref(part)
ref.Name = "SharedObject"
print(part.Name) -- SharedObject
print(compareinstances(part, ref)) -- true
part:Destroy()