# engineRestoreModelOverlay (Client)

> Undoes what this resource's `engineSetModelOverlay` did of every instance of a model.

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

## Syntax

```lua
bool engineRestoreModelOverlay(string|element model [, int|string selector = nil, material material = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `model` | `string\|element` | The model's name or a `model` element. |
| `selector` | `int\|string` | Only what was picked with this selector (the same index or name). With `material`, it also takes a name a wildcard caught out of that material. Without it, everything. *(default: `nil`)* |
| `material` | `material` | Only the layers made with this material. Without it, any. *(default: `nil`)* |

## Returns

`true` if something was undone, `false` if there was nothing to undo.

## Example

```lua
local dirt = engineCreateMaterial("surface_alpha")
engineSetModelOverlay("bobcat", 1, dirt)

setTimer(function()
    engineRestoreModelOverlay("bobcat", 1, dirt)
end, 10000, 1)
```

## See also

- [engineSetModelOverlay (Client)](https://wiki.mymp.gg/en/engineSetModelOverlay.md): Draws a material as an extra layer over the chosen materials of every instance of a model.
- [engineGetModelMaterials (Client)](https://wiki.mymp.gg/en/engineGetModelMaterials.md): Lists the loaded model's materials, in the order the model keeps them.
