# setVehicleLightTrailsEnabled (Client)

> Turns on or off red light trails behind a vehicle's lit tail lamps, longer the faster it goes.

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

## Syntax

```lua
bool setVehicleLightTrailsEnabled(vehicle vehicle, bool enabled)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `vehicle` | The vehicle. |
| `enabled` | `bool` | Turn the trails on or off. |

## Returns

`true` if it changed, `false` if the vehicle is not streamed in.

The trails start turned off.

## Example

```lua
addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(vehicle)
    setVehicleLightTrailsEnabled(vehicle, true)
end)
```

### Note

The choice lives on the streamed-in vehicle: it is lost when the vehicle streams out.

## See also

- [areVehicleLightTrailsEnabled (Client)](https://wiki.mymp.gg/en/areVehicleLightTrailsEnabled.md): Tells whether a vehicle leaves light trails behind its tail lamps.
- [setVehicleOverrideLights (Shared)](https://wiki.mymp.gg/en/setVehicleOverrideLights.md): Forces a vehicle's lights on or off, or hands the choice back to the game.
