# sm.projectile.playerFire

Creates and fires a projectile from a player.

**Kind:** Function

**Environments:** Game

## Game

### Overload 1

``` { .lua .api-signature }
sm.projectile.playerFire(
    name,
    position,
    velocity,
    fakePosThird?,
    fakePosFirst?,
    delay?
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.projectile.md#playerfire-string-vec3-vec3-vec3-optional-vec3-optional-integer-optional)

**Availability:** Client only

> **Deprecated:**
> Name is deprecated, use uuid instead
>

The projectile is normally fired from the player's position, but due to the weapon being held off-center it may require a fake position for where the projectile appears to be fired from.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The projectile's name. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The start position. |
| `velocity` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The direction and velocity. |
| `fakePosThird` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The visual start position in third-person. (Defaults to position) |
| `fakePosFirst` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The visual start position in first-person. (Defaults to position) |
| `delay` *(optional)* | integer | The number of ticks before firing. (Defaults to 0) |

### Overload 2

``` { .lua .api-signature }
sm.projectile.playerFire(
    uuid,
    position,
    velocity,
    fakePosThird?,
    fakePosFirst?,
    delay?
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.projectile.md#playerfire-uuid-vec3-vec3-vec3-optional-vec3-optional-integer-optional)

**Availability:** Client only

The projectile is normally fired from the player's position, but due to the weapon being held off-center it may require a fake position for where the projectile appears to be fired from.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `uuid` | [Uuid](../Game-Script-Environment/Userdata/Uuid.md) | The projectile's uuid. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The start position. |
| `velocity` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The direction and velocity. |
| `fakePosThird` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The visual start position in third-person. (Defaults to position) |
| `fakePosFirst` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The visual start position in first-person. (Defaults to position) |
| `delay` *(optional)* | integer | The number of ticks before firing. (Defaults to 0) |
