# sm.body.getCreationsFromBodies

Returns a table of tables, which is an array of tables containing bodies grouped by creation.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.body.getCreationsFromBodies( bodies )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.body.md#getcreationsfrombodies)

A creation includes all bodies connected by [joints](../Game-Script-Environment/Userdata/Joint.md), etc.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `bodies` | table | The bodies to find all creation bodies from. \{[Body](../Game-Script-Environment/Userdata/Body.md), ...\} |

**Returns:**

| Type | Description |
| --- | --- |
| table | The table array containing tables of all the bodies, grouped by creation. \{ \{[Body](../Game-Script-Environment/Userdata/Body.md), ...\}, ... \} |
