# sm.debris.createBlackHole

Add a black hole that attracts nearby debris towards its position.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.debris.createBlackHole(
    position,
    radius?,
    force?,
    position2?,
    wanderForce?,
    dissolveRadius?,
    timeToLive?,
    channel?
)
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The position of the black hole. |
| `radius` *(optional)* | number | The radius of effect. (Defaults to 10) |
| `force` *(optional)* | number | The attraction force. (Defaults to 100) |
| `position2` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | An optional secondary position, making the black hole a capsule shape instead of a sphere. |
| `wanderForce` *(optional)* | number | A force applied along direction from position to position2. (Defaults to 0) |
| `dissolveRadius` *(optional)* | number | The radius within which debris will start to dissolve. (Defaults to 0) |
| `timeToLive` *(optional)* | number | The time the black hole will be simulated before disappearing. (Defaults to one tick) |
| `channel` *(optional)* | number | The channel this black hole affects. Debris only reacts to black holes matching its channel. 0 means no debris is affected. (Defaults to 1) |
