# Problem code `'target-ambiguous'`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts`, `tables/problems.json` and `services/onsite-scripter/scripts/contract-docs-what-to-do.json` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

A member of [`ProblemCode`](../api/ProblemCode.md) · stable · since 2.0.0

A single-part member (`follow` target, `attachTo`) matched several parts; nothing applied.

## What to do

Give the single-part member one part: a model as a whole is [`session.node(nodeId)`](../api/Writer.node.md) (a [`Part`](../api/Part.md) is a [`Query`](../api/Query.md)), one authored part is `{ node, name }` with its whole name, or `{ node, root: true }`; [`session.find(q).first()`](../api/Parts.first.md) picks the first match.

```ts
session.find({ tag: 'badge' }).follow(session.node(frameId), { signal });
```

## Where the declaration names it

- [`CollectionOptions.attachTo`](../api/CollectionOptions.attachTo.md): Its items' `at` are in that part's frame, so they draw and read where it is drawn, move with it and hide while it is hidden; while no part matches, or only this collection's own parts do, they are in the world, and a query that matches several parts attaches nothing ('target-ambiguous').
- [`PartActions.follow`](../api/PartActions.follow.md): A target that matches several parts applies nothing ('target-ambiguous').

The set is open: handle a code you don't know (`'other'`).

## Recorded by

- the table row `failure-matrix/errorCases/query-matches-several` (`tables/failure-matrix.json`)
