<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [Player](./server.player.md) &gt; [setMaxInteractDistance](./server.player.setmaxinteractdistance.md)

## Player.setMaxInteractDistance() method

Sets the maximum distance a player can interact with entities or blocks.

**Signature:**

```typescript
setMaxInteractDistance(distance: number): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

distance


</td><td>

number


</td><td>

The maximum distance in blocks used for the interact raycast.

\*\*Category:\*\* Players


</td></tr>
</tbody></table>
**Returns:**

void

