# engineRestoreElementTexture (Client)

> Removes the texture swaps this resource set on one element with `engineSetElementTexture`.

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

## Syntax

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The vehicle, ped, player or object. |
| `name` | `string` | Only the swaps made under this name. Without it, every swap of this resource on the element. *(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 the element is not a vehicle, ped, player or object.

## Example

```lua
local vehicle = createVehicle("infernus", 1544.0, -1675.0, 13.6)
engineSetElementTexture(vehicle, "vehiclelights128", false)

setTimer(function()
    engineRestoreElementTexture(vehicle)
end, 5000, 1)
```

## See also

- [engineSetElementTexture (Client)](https://wiki.mymp.gg/en/engineSetElementTexture.md): Swaps a texture on one vehicle, ped, player or object alone. Other instances of the same model keep their textures.
- [engineRestoreModelTexture (Client)](https://wiki.mymp.gg/en/engineRestoreModelTexture.md): Removes the texture swaps this resource set on a model with engineSetModelTexture.
- [engineRestoreElementMaterial (Client)](https://wiki.mymp.gg/en/engineRestoreElementMaterial.md): Undoes what this resource's engineSetElementMaterial did of a single vehicle, ped or object.
