Disable / enable / disconnect signal connections
set-connection-stateToggle or permanently remove connections on an RBXScriptSignal: disable/enable handlers reversibly or disconnect them entirely; scope one or all, with confirm required for destructive actions.
Instructions
MUTATES CLIENT STATE. Toggles or removes connections on an RBXScriptSignal: 'disable' temporarily stops a connection from firing (reversible with 'enable'), 'enable' re-activates a disabled connection, and 'disconnect' permanently removes it — IRREVERSIBLE for that connection (you would have to recreate it). scope='one' targets a single connection by index; scope='all' applies to every connection on the signal. Because they are destructive, scope='all' and action='disconnect' BOTH require confirm=true or the tool refuses without changing anything. Useful for silencing or surgically removing event handlers (e.g. anti-cheat or input listeners) while debugging. Requires getconnections plus the connection's Disable/Enable/Disconnect methods; degrades with a clear { error } if unavailable. Returns { Signal, Instance?, Action, Scope, Affected } or { error }. Signature: { instancePath: string, signalName: any?, action: "disable" | "enable" | "disconnect", scope: any?, connectionIndex: any?, confirm: any?, threadContext: number? }. Phase: act; cost=medium; idempotency=idempotent-write. Requires: active-client, resolved-target, explicit-mutation-approval. Capabilities: getconnections. Produces: created-handle, 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 |
|---|---|---|---|
| scope | No | 'one' (default) affects only the single connection at connectionIndex; 'all' affects every connection on the signal and REQUIRES confirm=true. | one |
| action | Yes | What to do to the matched connection(s): 'disable' = stop firing but keep it (reversible via 'enable'); 'enable' = re-activate a disabled connection; 'disconnect' = permanently remove it (IRREVERSIBLE, requires confirm=true). | |
| confirm | No | Safety gate for destructive operations. Must be true to run when scope='all' OR action='disconnect'; otherwise the tool refuses without making changes. Not required for disable/enable on a single connection. | |
| signalName | No | Name of the RBXScriptSignal member on the instance (e.g. 'Touched', 'Changed'). Leave empty/omit if instancePath already evaluates to the signal. | |
| instancePath | Yes | Lua expression resolving to the Instance that owns the signal (e.g. 'game.Workspace.Door'). Evaluated as `return <instancePath>`. Leave signalName empty if this expression already resolves to the signal itself. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. | |
| connectionIndex | No | Zero-based index of the target connection within getconnections(signal) when scope='one', matching the Index from list-signal-connections. Ignored when scope='all'. Defaults to 0. |