Syntax
cloneref(instance: Instance): InstanceAliases
clonereferenceArguments
| Name | Type | Description |
|---|---|---|
instance | Instance | Instance object used as the source for the new reference. |
Returns
| Name | Type | Description |
|---|---|---|
reference | Instance | Instance reference returned after Instance cache runs with the original Instance reference. |
Description
Pushes a new Instance reference for the same same underlying Instance and returns it.
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
Create another Instance reference from an existing Instance userdata.
local Players = game:GetService("Players")
local reference = cloneref(Players)
print(reference)
local sameAlias = clonereference(Players)
print(sameAlias)