# engineRestoreModelTxd (Client)

> Takes away the txds this resource put in front of a model with `engineSetModelTxd`.

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

## Syntax

```lua
bool engineRestoreModelTxd(string|element model [, txd|string txd = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `model` | `string\|element` | The model's name, or a `model` element from `engineCreateModel`. |
| `txd` | `txd\|string` | Only this txd (an element or a name). Without it, every txd this resource added to the model. *(default: `nil`)* |

## Returns

`true` if at least one txd was taken away, `false` if none matched. Raises an error if no model or no txd has that name.

## Example

```lua
local txd = engineLoadTxd("models/infernus_neon.ktd")
engineSetModelTxd("infernus", txd)

addCommandHandler("stockinfernus", function()
    engineRestoreModelTxd("infernus", txd)
end)
```

## See also

- [engineSetModelTxd (Client)](https://wiki.mymp.gg/en/engineSetModelTxd.md): Puts a txd in front of a model's own, so the model finds its textures there first and falls back to its own for the rest.
- [engineGetModelTxds (Client)](https://wiki.mymp.gg/en/engineGetModelTxds.md): Lists the txds a model takes its textures from, in the order it searches them.
- [engineRestoreModelTexture (Client)](https://wiki.mymp.gg/en/engineRestoreModelTexture.md): Removes the texture swaps this resource set on a model with engineSetModelTexture.
