> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# setsimulationradius

Sets the local player's simulation radius.

```luau theme={null}
setsimulationradius(radius: number, max_radius: number?): ()
```

With one argument, this sets `SimulationRadius` and also sets `MaximumSimulationRadius` to the same value. Pass `max_radius` to set the maximum to a different value.

## Parameters

| Parameter    | Type      | Description                                                        |
| ------------ | --------- | ------------------------------------------------------------------ |
| `radius`     | `number`  | The new simulation radius.                                         |
| `max_radius` | `number?` | The maximum simulation radius. Defaults to `radius` when left out. |

## Returns

<code title="the function does not return a value.">void</code>

## Example

The engine keeps resetting a high radius, so re-apply it every frame to hold network ownership over far-away parts.

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  setsimulationradius(1000)
  =======
  -- setsimulationradius(radius: number, max_radius: number?): ()
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  local RunService = game:GetService("RunService")

  RunService.RenderStepped:Connect(function()
      setsimulationradius(10000)
  end)
  ```
</CodeGroup>

<Tip>
  Modifying this can allow physics ownership of unanchored parts at extreme distances.
</Tip>
