---
name: "setGroupOwner"
type: command
status: ok
groups: ["Multiplayer"]
arma3_since: "1.40"
locality: {"argument": null, "effect": null, "server_exec": true}
source: https://community.bistudio.com/wiki/setGroupOwner
revid: 364895
updated: 2024-06-29T14:38:33Z
---

# setGroupOwner

*Command · Multiplayer · Arma 3 v1.40*

Locality: **server execution only**

## Description

Changes the ownership of a group (and all its units) to a given client. The group leader must not be a player. This command only works when called from the server. Returns true if locality was changed. For [agents](../commands/agents.md) use [setOwner](../commands/setOwner.md) command.

## Syntax

```sqf
group setGroupOwner clientID
```

**Parameters:**

- `group`: [Group](../topics/Group.md)
- `clientID`: [Number](../topics/Number.md) - the [machine network ID](../topics/Multiplayer_Scripting.md#machine-network-id) of the new [owner](../commands/owner.md).

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

## Examples

### Example 1

```sqf
_localityChanged = _someGroup setGroupOwner (owner _playerObject);
```

## See also

[owner](../commands/owner.md) · [setOwner](../commands/setOwner.md) · [groupOwner](../commands/groupOwner.md)

## Community notes

**Nelis75733126** — 2015-07-30

In Arma 3 1.48, setGroupOwner only works if the group has units in it.

---

**TMZulu** — 2020-04-28

The [setGroupOwner](../commands/setGroupOwner.md) command will dismount the unit leader of a vehicle if the vehicle is stationary, likely due to the dummy waypoint used in the transfer.\
[Locking](../commands/lock.md) the vehicle during transfer can counter this behavior.

---

**TMZulu** — 2020-04-30

Using **setGroupOwner** may cause AI to have their loadout removed. This typically occurs when transferring multiple groups in sequence without delay. This occurs on seemingly random AI in groups. The simple but finicky solution to this is to add a sufficient delay between the transfer of groups. Alternatively, one could have the units' loadouts saved and then reloaded if the unit is shown as naked. Both of these methods may be combined as well.

---

**TMZulu** — 2020-04-30

Locality dependent commands such as **forceSpeed** will no longer work after transfer and must be reapplied on the owning client.

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