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

# fireclickdetector

> ローカルプレイヤーに対して ClickDetector interaction を発火します。最初の引数は ClassName が ClickDetector の Instance である必要があります。distance は任意で、既定値は 0 です。clickOption は任意で、大文字小文字を区別せずに比較され、既定値は "mouseclick" です。対応する option は "mouseclick"、"rightmouseclick"、"mousehoverenter"、"mousehoverleave" です。click option は distance を float として Roblox click helper に渡し、hover option は distance を無視します。Players または Players.LocalPlayer が利用できない場合、この function は何も発火せずに戻ります。不明な clickOption でも interaction は発生しません。この function は何も返しません。

<div className="real-function-page">
  ```lua theme={null}
  fireclickdetector(detector: Instance, distance?: number, clickOption?: "mouseclick" | "rightmouseclick" | "mousehoverenter" | "mousehoverleave")
  ```

  ## 引数

  <ParamField path={"detector"} type={"Instance"} required>
    ClassName が ClickDetector である必要がある Instance。
  </ParamField>

  <ParamField path={"distance"} type={"number"}>
    任意の distance 値。既定値は 0 で、"mouseclick" と "rightmouseclick" では float として渡されます。
  </ParamField>

  <ParamField path={"clickOption"} type={"\"mouseclick\" | \"rightmouseclick\" | \"mousehoverenter\" | \"mousehoverleave\""}>
    任意の interaction selector。string として読み取られ、大文字小文字を区別せずに比較され、既定値は "mouseclick" です。
  </ParamField>

  ## 例

  ClickDetector で既定の "mouseclick" interaction を発火します。

  ```lua theme={null}
  local detector = workspace.InteractivePart.ClickDetector

  fireclickdetector(detector)
  ```
</div>
