---
name: "unassignVehicle"
type: command
status: ok
groups: ["Object Manipulation", "Unit Control"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/unassignVehicle
revid: 363373
updated: 2024-03-28T19:52:42Z
---

# unassignVehicle

*Command · Object Manipulation, Unit Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **local** · effect **global**

## Description

Unassigns individual unit from a vehicle, usually previously assigned with *assignAsXXX* command, i.e removes [assignedVehicleRole](../commands/assignedVehicleRole.md) of the unit.
If the unit is currently in that vehicle, the group leader will issue an order to disembark.

> [!NOTE]
> See AI Group Vehicle Management for more information.

## Syntax

```sqf
unassignVehicle unitName
```

**Parameters:**

- `unitName`: [Object](../topics/Object.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
unassignVehicle player;
```

### Example 2

Make all the occupants of a vehicle disembark:

```sqf
{ unassignVehicle _x } forEach crew _vehicle;
```

### Example 3

Make all the occupants of a vehicle disembark and unable to get back in:

```sqf
private _crew = crew _vehicle;
{ unassignVehicle _x } forEach _crew;
_crew allowGetIn false;
```

## See also

[assignAsCargo](../commands/assignAsCargo.md) · [assignAsCommander](../commands/assignAsCommander.md) · [assignAsDriver](../commands/assignAsDriver.md) · [assignAsGunner](../commands/assignAsGunner.md) · [assignAsTurret](../commands/assignAsTurret.md) · [assignedVehicle](../commands/assignedVehicle.md) · [leaveVehicle](../commands/leaveVehicle.md) · [assignedVehicles](../commands/assignedVehicles.md) · [assignedGroup](../commands/assignedGroup.md) · [fullCrew](../commands/fullCrew.md)

<sub>Source: [BI Community Wiki — unassignVehicle](https://community.bistudio.com/wiki/unassignVehicle) (revision 363373).</sub>
