# getElementBonePosition (Client)

> Returns the world position of a ped's or object's bone.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Components and bones
- **URL**: https://wiki.mymp.gg/en/getElementBonePosition

## Syntax

```lua
vec3|false getElementBonePosition(ped|object element, int|string bone)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `ped\|object` | The ped, player or object. An object needs a model with a skeleton or a node tree. |
| `bone` | `int\|string` | The bone. On a ped: an MTA bone id, a rig bone's tag or its name. On an object: a node's name or a bone's tag. |

## Returns

A `vec3` with the position, or `false` if the element is streamed out or the ped has no such bone.

## Example

```lua
addEventHandler("onClientRender", root, function()
    local hand = getElementBonePosition(localPlayer, 24)
    if hand then
        dxDrawLine3D(hand.x, hand.y, hand.z, hand.x, hand.y, hand.z + 1, tocolor(255, 0, 0))
    end
end)
```

### Coming from MTA

In MTA it works on peds only and returns three numbers. Here it also takes objects and rig bones by tag or name.

### Note

Raises an error if the element has no such bone. While the element is streamed out, it returns `false`.

## See also

- [setElementBonePosition (Client)](https://wiki.mymp.gg/en/setElementBonePosition.md): Moves a ped's or object's bone to a world position, keeping its orientation. The change applies on this client only.
- [getElementBoneMatrix (Client)](https://wiki.mymp.gg/en/getElementBoneMatrix.md): Returns the world matrix of a ped's or object's bone.
- [getPedBonePosition (Client)](https://wiki.mymp.gg/en/getPedBonePosition.md): Returns the world position of a ped's bone.
