# sm.character.createCharacter

Creates a new character in a world.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.character.createCharacter( player, world, position, yaw?, pitch?, visible? )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.character.md#createcharacter)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `player` | [Player](../Game-Script-Environment/Userdata/Player.md) | The player controlling the character. |
| `world` | [World](../Game-Script-Environment/Userdata/World.md) | The world the character is created in. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position of the character. |
| `yaw` *(optional)* | number | The initial yaw of the character (Optional). |
| `pitch` *(optional)* | number | The initial pitch of the character (Optional). |
| `visible` *(optional)* | boolean | Whether the character is visible on spawn. Defaults to true. (Optional) |

**Returns:**

| Type | Description |
| --- | --- |
| [Character](../Game-Script-Environment/Userdata/Character.md) | The created character. |
