Skip to content
Saiko

fireclickdetector

Triggers a ClickDetector remotely without the player having to click it.

Signature

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

Parameters

detectorClickDetector

The detector to fire.

distancenumber?

Reported click distance. Defaults to 0.

eventstring?

Which event to fire, such as "MouseClick" or "RightMouseClick".

Returns

Nothing.

Example

luau
local detector = workspace.Door.ClickDetector
fireclickdetector(detector) -- as if clicked from here
fireclickdetector(detector, 5, "MouseHoverEnter")