fireclickdetector

Fires a ClickDetector event.

Syntax

Signature
fireclickdetector(Instance: Instance, Distance: number?, Event: string?) -> ()

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
InstanceInstanceClickDetector wrapper or reference proxy.
Distancenumber?Compatibility argument. Its value is ignored.
Eventstring?MouseClick, RightMouseClick, MouseHoverEnter, or MouseHoverLeave.

Returns

TypeDescription
()None.

Notes

Event defaults to MouseClick and also accepts RightMouseClick, MouseHoverEnter, and MouseHoverLeave. Distance is accepted but is not used. The object must report ClassName ClickDetector and expose the selected signal.

Example

Luau
local Detector = workspace:FindFirstChild("ClickDetector")
if Detector then fireclickdetector(Detector) end