Find instances that have connections on a named signal
find-instances-with-connectionsScan descendants of a root instance to find which ones have active handlers on a given Roblox signal, returning paths and connection counts.
Instructions
Walk every descendant of a root instance and report which ones have an active handler on a specific signal. For each descendant it reads inst[signalName]; if that member is an RBXScriptSignal with at least one connection (per getconnections), it records { Path, ClassName, ConnectionCount }. Results are sorted by ConnectionCount descending. This answers questions like "which Parts in Workspace have a Touched handler?", "which GuiButtons are wired to Activated?", or "who is listening to Changed under this model?". Requires the executor's getconnections; degrades to a clear { error } if unavailable. Scanning is capped at limit instances to stay responsive on huge games. Returns { Signal, Root, ScannedInstances, Truncated, MatchCount, Instances: [...] }. Signature: { root: any?, signalName: string, limit: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Capabilities: getconnections. Produces: bounded-candidates, created-handle. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Lua expression for the root instance whose descendants are scanned (e.g. 'game', 'game.Workspace', 'game.Workspace.Map'). Evaluated as `return <root>`. Defaults to 'game' (scans the whole DataModel up to the limit). Narrow this for faster, more focused scans. | game |
| limit | No | Maximum number of descendant instances to SCAN (not match) before stopping. Defaults to 1000. Increase to cover larger hierarchies (slower); decrease for a quick sample. If the scan stops early because this cap was hit, Truncated is true. | |
| signalName | Yes | REQUIRED name of the signal member to probe on each descendant (e.g. 'Touched', 'Changed', 'ChildAdded', 'Activated', 'OnClientEvent'). Only instances exposing this member as an RBXScriptSignal with >0 connections are reported. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |