> ## 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.

# fireproximityprompt

> 通过 Real 的 ProximityPrompt trigger 触发 ProximityPrompt。prompt 参数必须是 object，并且 ClassName 字段等于 "ProximityPrompt"。如果值不是 object，调用会抛出 type error。如果 ClassName 缺失或不是 string，会抛出 "Invalid Instance"。如果 ClassName 不是 "ProximityPrompt"，会抛出 "ProximityPrompt expected"。function 不接受 optional arguments，也不返回任何内容。

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

  ## 参数

  <ParamField path={"prompt"} type={"Instance"} required>
    ClassName 必须为 ProximityPrompt 的 Instance。
  </ParamField>

  ## 示例

  使用唯一必需参数触发 ProximityPrompt。

  ```lua theme={null}
  local prompt = workspace.InteractivePart.ProximityPrompt

  fireproximityprompt(prompt)
  ```
</div>
