语法
cloneref(instance: Instance): Instance别名
clonereference参数
| 名称 | 类型 | 描述 |
|---|---|---|
instance | Instance | 要克隆的实例。 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
reference | Instance | 克隆的实例。 |
说明
克隆一个实例,保留相同的注册表引用和元数据。
使用 1 个参数调用: instance。参数表会说明哪些值必填,哪些值只用于细化行为。
返回 reference (Instance)。使用返回表区分成功值、nil 结果和可恢复错误。
示例
使用占位值的示例调用。
local result = cloneref(game)
print(result)