Skip to content
InstancesOverview

cloneref

Creates another reference to an existing object.

Aliasesclonereference

Details#

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

Luau
local part = Instance.new("Part")
local ref = cloneref(part)
ref.Name = "SharedObject"
print(part.Name) -- SharedObject
print(compareinstances(part, ref)) -- true
part:Destroy()