# engineRestoreModelTexture (Client)

> Removes the texture swaps this resource set on a model with `engineSetModelTexture`.

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

## Syntax

```lua
bool engineRestoreModelTexture(string|element model [, string name = nil, texture|dui|bool source = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `model` | `string\|element` | The model's name, or a `model` element from `engineCreateModel`. |
| `name` | `string` | Only the swaps made under this name. Without it, every swap of this resource on the model. *(default: `nil`)* |
| `source` | `texture\|dui\|bool` | Only the swaps to this source (`false` for the ones that hide). *(default: `nil`)* |

## Returns

`true` if at least one swap was removed, `false` if none matched. Raises an error if no model has that name.

## Example

```lua
engineSetModelTexture("infernus", "vehiclelights128", false)

addCommandHandler("lightson", function()
    engineRestoreModelTexture("infernus", "vehiclelights128")
end)
```

## See also

- [engineSetModelTexture (Client)](https://wiki.mymp.gg/en/engineSetModelTexture.md): Swaps a texture on every instance of a model. Only that model's materials change, not the txd the texture comes from.
- [engineRestoreWorldTexture (Client)](https://wiki.mymp.gg/en/engineRestoreWorldTexture.md): Removes the world texture swaps this resource set with engineSetWorldTexture.
- [engineRestoreElementTexture (Client)](https://wiki.mymp.gg/en/engineRestoreElementTexture.md): Removes the texture swaps this resource set on one element with engineSetElementTexture.
