# Shape.getJoints

Returns a table of all [joints](../Game-Script-Environment/Userdata/Joint.md) that are attached to the shape.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
shape:getJoints( onlyChildJoints? )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Shape.md#getjoints)

Will return all attached joints when onlyChildJoints is set to false.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `shape` | [Shape](../Game-Script-Environment/Userdata/Shape.md) | The shape. |
| `onlyChildJoints` *(optional)* | boolean | Filters what joints to return. Defaults to true (Optional) |

**Returns:**

| Type | Description |
| --- | --- |
| table | The table of joints attached to the shape. \{[Joint](../Game-Script-Environment/Userdata/Joint.md), ..\} |
