# sm.projectile.removeProjectilesWithSource

Removes projectiles created by a given source. The source world must exist.

**Kind:** Function

**Environments:** Game

## Game

### Overload 1

``` { .lua .api-signature }
sm.projectile.removeProjectilesWithSource( source, delay? )
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `source` | [World](../Game-Script-Environment/Userdata/World.md) | The world that is the source of the projectile. |
| `delay` *(optional)* | integer | The number of ticks before destroying the projectile. (Defaults to 0) |

### Overload 2

``` { .lua .api-signature }
sm.projectile.removeProjectilesWithSource( source, delay? )
```

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

**Availability:** Client only

Removes projectiles created by a given source. The source player must exist.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `source` | [Player](../Game-Script-Environment/Userdata/Player.md) | The player that is the source of the projectile. |
| `delay` *(optional)* | integer | The number of ticks before destroying the projectile. (Defaults to 0) |

### Overload 3

``` { .lua .api-signature }
sm.projectile.removeProjectilesWithSource( source, delay?, world? )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.projectile.md#removeprojectileswithsource-character-integer-optional-world-optional)

**Availability:** Client only

Removes projectiles created by a given character source. Can remove projectiles from a source that doesn't exist, in this case a world to remove from is required.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `source` | [Character](../Game-Script-Environment/Userdata/Character.md) | The Character that is the source of the projectile. |
| `delay` *(optional)* | integer | The number of ticks before destroying the projectile. (Defaults to 0) |
| `world` *(optional)* | [World](../Game-Script-Environment/Userdata/World.md) | The world the projectiles should be removed from. (Defaults to same world as source.) |
