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

> Fires a ClickDetector interaction for the local player. The first argument must be an Instance whose ClassName is ClickDetector. distance is optional and defaults to 0. clickOption is optional, compared case-insensitively, and defaults to "mouseclick". Supported options are "mouseclick", "rightmouseclick", "mousehoverenter", and "mousehoverleave". Click options pass distance as a float to the Roblox click helper, while hover options ignore distance. If Players or Players.LocalPlayer is not available, the function returns without firing anything. An unknown clickOption also results in no interaction. The function returns nothing.

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

  ## Arguments

  <ParamField path={"detector"} type={"Instance"} required>
    Instance whose ClassName must be ClickDetector.
  </ParamField>

  <ParamField path={"distance"} type={"number"}>
    Optional distance value. Defaults to 0 and is passed as a float for "mouseclick" and "rightmouseclick".
  </ParamField>

  <ParamField path={"clickOption"} type={"\"mouseclick\" | \"rightmouseclick\" | \"mousehoverenter\" | \"mousehoverleave\""}>
    Optional interaction selector. It is read as a string, compared case-insensitively, and defaults to "mouseclick".
  </ParamField>

  ## Example

  Fire the default "mouseclick" interaction on a ClickDetector.

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

  fireclickdetector(detector)
  ```
</div>
