# engineSetModelCol (Client)

> Makes a model collide with a collision loaded with `engineLoadCol` instead of its own.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Models
- **URL**: https://wiki.mymp.gg/en/engineSetModelCol

## Syntax

```lua
bool engineSetModelCol(string|element model, element col [, int priority = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `model` | `string\|element` | The model's name, or a `model` element from `engineCreateModel`. |
| `col` | `element` | A `col` element from `engineLoadCol`. |
| `priority` | `int` | Among several collisions given to the same model, the highest priority answers; among equals, the newest. *(default: `0`)* |

## Returns

`true` once it is set. Raises an error if no model has that name or the element is not a `col`.

## Example

```lua
local model = engineCreateModel("bench_blue", "object")
local col = engineLoadCol("models/bench_blue.kbn")
engineSetModelCol(model, col)
```

### Coming from MTA

Takes the place of MTA's `engineReplaceCOL`.

## See also

- [engineLoadCol (Client)](https://wiki.mymp.gg/en/engineLoadCol.md): Loads a collision file (.kbn) from the resource so it can be given to a model.
- [engineRestoreModelCol (Client)](https://wiki.mymp.gg/en/engineRestoreModelCol.md): Takes away the collision this resource gave a model with engineSetModelCol, so it collides as it did before.
- [engineSetModelDrawable (Client)](https://wiki.mymp.gg/en/engineSetModelDrawable.md): Makes a model draw a drawable loaded with engineLoadDrawable instead of its own.
