---
name: "setOwner"
type: command
status: ok
groups: ["Multiplayer"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": true}
source: https://community.bistudio.com/wiki/setOwner
revid: 351991
updated: 2024-02-01T23:23:57Z
---

# setOwner

*Command · Multiplayer · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.62*

Locality: arguments **global** · **server execution only**

## Description

From server machine, change the ownership of an object to a given client. Using command in an unintended way will log a message to .rpt file. To transfer ownership of all AI units in a group properly, use [setGroupOwner](../commands/setGroupOwner.md) instead.

## Syntax

```sqf
object setOwner clientID
```

**Parameters:**

- `object`: [Object](../topics/Object.md) - object to transfer
- `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) - returns [true](../commands/true.md) if ownership was successfully transferred, otherwise [false](../commands/false.md)

## Examples

### Example 1

```sqf
_someObject setOwner 12;
```

### Example 2

```sqf
_someObject setOwner (owner _playerObject);
```

## Problems

> [!NOTE]
> **Arma 3:** Since Arma 3 v1.40, this command should not be used to transfer ownership of units with AI with the exception of [agents](../commands/agents.md).

> [!IMPORTANT]
> **Prior to Arma 3 v1.40** it was not possible to transfer the ownership from a client back to the server.

## See also

[owner](../commands/owner.md) · [setGroupOwner](../commands/setGroupOwner.md) · [groupOwner](../commands/groupOwner.md) · [didJIPOwner](../commands/didJIPOwner.md)

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