> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# cloneref

> 为同一个底层 Instance 指针 push 一个新的 Instance 引用并返回它。

<div className="real-function-page">
  ```lua theme={null}
  cloneref(instance: Instance): Instance
  ```

  ## 别名

  * `clonereference`

  ## 参数

  <ParamField path={"instance"} type={"Instance"} required>
    作为新引用来源的 Instance object。
  </ParamField>

  ## 返回值

  <ResponseField name={"reference"} type={"Instance"}>
    使用原始 object 指针运行 Instance cache 后返回的 Instance 引用。
  </ResponseField>

  ## 示例

  从现有 Instance object 创建另一个 Instance 引用。

  ```lua theme={null}
  local Players = game:GetService("Players")

  local reference = cloneref(Players)
  print(reference)

  local sameAlias = clonereference(Players)
  print(sameAlias)
  ```
</div>
