# setElementBoneScale (Client)

> Changes the scale of a ped's or object's bone. The change applies on this client only.

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

## Syntax

```lua
bool setElementBoneScale(ped|object element, int|string bone, float x, y, z)
```

## 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. |
| `x, y, z` | `float` | The scale on each axis, from 0 to 10: three numbers, one number for all three axes, or one `vec3`. `1` is the original size. |

## Returns

`true` if it was changed. `false` if the element is streamed out, the ped cannot scale that bone or the object is animated.

Whatever is attached to the bone follows it.

## Example

```lua
addCommandHandler("bighead", function()
    setElementBoneScale(localPlayer, 5, 2)
end)
```

### Note

Raises an error if the element has no such bone or a scale is outside 0 to 10. While the element is streamed out, it returns `false`.

## See also

- [getElementBoneScale (Client)](https://wiki.mymp.gg/en/getElementBoneScale.md): Returns the scale of a ped's or object's bone.
- [setElementBoneMatrix (Client)](https://wiki.mymp.gg/en/setElementBoneMatrix.md): Sets the world matrix of a ped's or object's bone: position, orientation and scale at once. The change applies on this client only.
- [onClientPedsProcessed (Client)](https://wiki.mymp.gg/en/onClientPedsProcessed.md): Fired every frame after peds and objects have been animated, before they are presented and drawn.
