# setPedHeadBlend (Shared)

> Builds a ped's face by blending the head and skin of two parents.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Appearance
- **URL**: https://wiki.mymp.gg/en/setPedHeadBlend

## Syntax

```lua
bool setPedHeadBlend(ped ped, int father, int mother, int skinFather, int skinMother, float shapeMix, float skinMix)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `father` | `int` | The father's head, from 0 to 255, among the heritage heads of the ped's head. |
| `mother` | `int` | The mother's head, from 0 to 255. |
| `skinFather` | `int` | The father's skin tone, from 0 to 255. |
| `skinMother` | `int` | The mother's skin tone, from 0 to 255. |
| `shapeMix` | `float` | The shape mix, from 0 (the father) to 1 (the mother). |
| `skinMix` | `float` | The skin mix, from 0 (the father) to 1 (the mother). |

## Returns

`true` if it was applied. Raises an error if a parent is outside 0 to 255 or a mix is outside 0 to 1.

An index past the heads the ped's head declares wraps around to the start of the list. On the server, the change is sent to every client. On the client, it applies to this client only.

## Example

```lua
addEventHandler("onPlayerSpawn", root, function()
    setPedHeadBlend(source, 2, 21, 2, 21, 0.5, 0.3)
end)
```

### Coming from MTA

MTA does not have this function. It follows FiveM's `SetPedHeadBlendData`.

## See also

- [getPedHeadBlend (Shared)](https://wiki.mymp.gg/en/getPedHeadBlend.md): Tells how a ped's face blends its two parents.
- [setPedHeadShape (Shared)](https://wiki.mymp.gg/en/setPedHeadShape.md): Adjusts a feature of a ped's face, such as the nose or the chin.
- [setPedOverlay (Shared)](https://wiki.mymp.gg/en/setPedOverlay.md): Puts an overlay on a ped's face or takes it off, such as a beard, eyebrows or make-up.
