VINDICTA
Instances · Function
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

fireclickdetector

Fires a ClickDetector as if the player clicked it.

function fireclickdetector(detector: ClickDetector, distance: number?, event: string?): ()

Synopsis

How it works

Bypasses the Roblox client's input processing pipeline and directly invokes the ClickDetector's internal activation method. This fires the MouseClick (or RightMouseClick) signal on the detector, which replicates to the server as a legitimate interaction. The distance parameter fakes the click distance check.

Under the hood

A ClickDetectorClickDetectorA Roblox Instance placed inside a BasePart that fires MouseClick/MouseHoverEnter/MouseHoverLeave signals when the player interacts with the part. fireclickdetector() simulates these interactions. normally requires:
  1. Mouse hover within MaxActivationDistance
  2. A genuine mouse input event from the OS
  3. Raycasting to verify line-of-sight
fireclickdetector skips all of these and directly fires the detector's internal signal, causing the server to process it as a real click. The server has no way to distinguish this from a real interaction.

Usage

Click a door detector
local detector = workspace.Door.ClickDetector
fireclickdetector(detector)

Parameters

detector ClickDetector
The ClickDetector instance to fire.
distance number optional
Simulated click distance (default 0).
event string optional
"MouseClick" (default) or "RightMouseClick".