Service · inherits Instance
VoiceChatService
VoiceChatService is responsible for voice chat's high-level functionality.
About VoiceChatService
VoiceChatService is responsible for voice chat's high-level functionality. This mostly consists of configuration options, and functions that are not specifically-controlled by more-specific instances.
Properties 3
DefaultDistanceAttenuation
: VoiceChatDistanceAttenuationTypePluginDetermines which distance attenuation curve the default voice chat setup uses whenAudioDeviceInputandAudioEmitterobjects are generated.This property controls the default distance attenuation curve assigned to any generated
AudioEmitterinstances in the default voice chat setup.This property only has an effect if
EnableDefaultVoiceandUseAudioApiare both enabled, since noAudioEmittersare otherwise generated.EnableDefaultVoice
: booleanPluginControls whether each voice-eligible player can be heard as though they were speaking through their character.When enabled, each voice-eligible player can be heard as though they were speaking through their character. The implementation details of the voice setup depend on
UseAudioApi.When
UseAudioApiisEnabled, disabling this property disables the default setup, butAudioDeviceInputwill still work. Conversely, whenUseAudioApiisDisabled, disabling the default voice setup effectively disables voice chat altogether.UseAudioApi
: AudioApiRolloutPluginControls whether voice chat is represented and controlled byAudioDeviceInputobjects.If
Enabled, the voice chat setup is represented and controlled byAudioDeviceInputobjects. More specifically:- An
AudioDeviceInputwill be created and parented to each voice-eligiblePlayer. - An
AudioEmitterwill be created and parented to each voice-eligible player'sPlayer.Character. - An
AudioListenerwill be created and parented toWorkspace.CurrentCamera.
You can disable the default setup by setting
VoiceChatService.EnableDefaultVoicetofalse.If
Disabled, the voice chat setup is done through an internal-only system.Currently, setting this to
Automatichas the same meaning asDisabled. However, in the future,Automaticwill becomeEnabled, so that new experiences can achieve greater customization over voice.- An
Methods 2
GetChatGroupsAsync
(players: Instances) → ArrayYieldsReturns chat group IDs that indicate which players can voice chat together.Returns a sorted array of arrays of chat group IDs for the given players. Each chat group ID is a string that represents a communication-compatible group within the current universe.
If two or more players share the same chat group ID, those players are eligible to voice chat with each other based on their age-check status, voice chat eligibility, and communication settings.
This method is server-side only and intended for real-time use cases such as matchmaking and teleporting. Chat group IDs are unique to the current universe, may change over time, and should not be stored once the user has left the experience. While you can hold onto the data returned for the purposes of gameplay while the user is in the experience, this data should not be stored after they've left.
To use this method, you must enable Chat & Voice Groups APIs in Experience Settings ⟩ Communication in Roblox Studio and agree to the Roblox Terms of Use.
In Roblox Studio this API is only available when the experience is running in Team Test.
IsVoiceEnabledForUserIdAsync
(userId: User) → booleanYieldsReturns whether or not the given user has voice enabled.Returns whether or not the given user has voice enabled. On the client-side, this can only be used to check the voice status of the local player. On the server-side, this can only check the voice status for players in that server.
This function can throw an error if the HTTP call fails.
VoiceChatService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.