# Effect.setWorld

Sets the world for an effect.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
effect:setWorld( world )
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `effect` | [Effect](../Game-Script-Environment/Userdata/Effect.md) | The effect. |
| `world` | [World](../Game-Script-Environment/Userdata/World.md) | The world. Defaults to world from script context. (optional) |
