Trigger a ClickDetector
fire-click-detectorTriggers a Roblox ClickDetector from a Luau path in the live game, bypassing distance and line-of-sight, to run click-gated logic like buy buttons or levers during automation and testing.
Instructions
WRITES LIVE GAME STATE. Resolve a Luau expression to a ClickDetector and trigger it via the executor's fireclickdetector, exactly as if the local player clicked the part it is attached to. This bypasses MaxActivationDistance and line-of-sight and fires the MouseClick signal, so any server/client logic bound to the detector runs (buy buttons, levers, clickable doors, NPC dialogs). Use it to drive click-gated game flow during automation/testing. Guards that fireclickdetector exists in this executor and that the target is actually a ClickDetector before firing; the fire call is pcall-guarded. WARNING: this mutates the running game and the effect may replicate to the server. Returns { Path, ok } or { error }. Signature: { path: string, distance: any?, threadContext: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, resolved-target, explicit-mutation-approval. Capabilities: fireclickdetector. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Luau expression resolving to the ClickDetector to fire, e.g. 'game.Workspace.Lever.ClickDetector' or 'game.Workspace.Shop.BuyButton.ClickDetector'. Evaluated as `return <path>` and must resolve to an Instance whose ClassName is 'ClickDetector'. | |
| distance | No | The distance (studs) to report to the detector as the click origin, passed as the second argument to fireclickdetector(cd, distance). Default 0 (treated as point-blank). Some games read this value to gate behavior; leave at 0 unless you need to emulate a specific click distance. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |