# Effect.setStartStopDistance

Sets an effect to stop and restart depending on distance to the player.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
effect:setStartStopDistance( startDistance, stopDistance )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Effect.md#setstartstopdistance)

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `effect` | [Effect](../Game-Script-Environment/Userdata/Effect.md) | The effect. |
| `startDistance` | number | The distance when effect will start |
| `stopDistance` | number | The distance when effect will stop |
