# resetElementComponentRotation (Client)

> Puts a vehicle's or object's component back at the model's own rotation, undoing `setElementComponentRotation`.

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

## Syntax

```lua
bool resetElementComponentRotation(vehicle|object element, string component)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `vehicle\|object` | The vehicle or object. |
| `component` | `string` | The component's name, as `getElementComponents` lists it. |

## Returns

`true` if it was reset, `false` if the component does not exist.

## Example

```lua
addCommandHandler("resetwheel", function()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    if vehicle then
        resetElementComponentRotation(vehicle, "wheel_lf_dummy")
    end
end)
```

### Coming from MTA

The same as MTA's `resetVehicleComponentRotation`, but it also works on objects.

## See also

- [setElementComponentRotation (Client)](https://wiki.mymp.gg/en/setElementComponentRotation.md): Turns a vehicle's or object's component. The change applies on this client only.
- [getElementComponentRotation (Client)](https://wiki.mymp.gg/en/getElementComponentRotation.md): Returns the rotation of a vehicle's or object's component, in degrees.
- [getElementComponents (Client)](https://wiki.mymp.gg/en/getElementComponents.md): Lists a vehicle's or object's components: the named frames of its model.
