Skip to main content

setDistance

Sets the player's voicechat distance.

note

Only has an effect if VoicechatModeType is proximity for the listening player.

Syntax​

player.setDistance(distance);

Parameters​

NameTypeDescription
distancenumber or nullThe distance to set the player's voicechat. Max distance is 1024. When set to null, the voicechat mode will be reset to the global default distance.

Returns​

  • Promise<void> - A promise that resolves when the player's voicechat distance has been set.

Example​

player.setDistance(128);

Available on: Server