Cache

cloneref

Clones an instance, holding the same registry reference and metadata.

Syntax

cloneref(instance: Instance): Instance
Aliases clonereference

Arguments

NameTypeDescription
instanceInstanceInstance to be cloned.

Returns

NameTypeDescription
referenceInstanceThe cloned instance.

Description

Clones an instance, holding the same registry reference and metadata.

Call it with 1 parameter(s): instance. The argument table explains which values are required and which ones only refine the behavior.

It returns reference (Instance). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = cloneref(game)
print(result)