# Parent-child relationships

An entity with the `ConnectedEntity` component does not cause an entity to attach itself to the connected entity. It is on the game developer to detect entities with `ConnectedEntity` components and attach to them to their game specific parents.

## Example

A ball that is supposed to be attached to the hand bone of a networked entity. In this case, the ball would show up only once the entity its connected to show up. To attach the ball to the hand, the game developer can write the following code snippet -

```csharp
var entity = coherenceSync.LinkedEntity;
if (entity != Entity.Null && EntityManager.HasComponent<ConnectedEntity>(entity))
{
    var connected = EntityManager.GetComponent<ConnectedEntity>(entity);
    var parent = CoherenceMonoBridge.EntityIdToTransform(connected.Value);
    var hand = parent.Find("RHand")
    gameObject.SetParent(hand);
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/0.4.14/connected-entities/parent-child-relationships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
