Yuari
Documentation
Docs/Instances/cloneref

cloneref

Returns a cloned instance reference.

Syntax

cloneref(instance: Instance) -> Instance

Parameters

ParameterTypeDescription
instanceInstanceThe Instance to read from or modify.

Returns

TypeDescription
InstanceA cloned instance reference

Description

cloneref is part of the Instances library. Instance helpers traverse the live DataModel and return instance proxies tied to the current game session.

Each call creates or returns a fresh object or value that you can store and pass to other functions.

The aliases clonereference(instance) resolve to the same implementation.

Example

local ref = cloneref(workspace)
print(compareinstances(ref, clonereference(workspace)))

Notes

  • Aliases: clonereference(instance).
  • Returned instances are live proxies; they can become invalid if the object is destroyed.