VoiceChatService

Show Deprecated
Not Creatable
Service

Summary

Properties

Indicates whether or not the place uses the default voice manager.

NOT BROWSABLE

Events

Methods


Returns whether or not the given user has voice enabled.

Properties

EnableDefaultVoice

Not Browsable

Indicates whether or not the place uses the default voice manager. This is on by default.

When enabled, the default voice manager adds all voice eligible users to the spatial voice chat as they join the place.

When disabled, the place doesn't use the default voice manager, and users are not added to the spatial voice chat when they join the place.

Events

Methods

IsVoiceEnabledForUserIdAsync

Yields

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.

This function is not yet implemented server-side.

This function can throw an error if the HTTP call fails.

The following code sample enables a UI layer only for voice enabled players.


1local Players = game:GetService(“Players”)
2local VoiceChatService = game:GetService(“VoiceChatService”)
3
4local localPlayer = Players.LocalPlayer
5local success, enabled = pcall(function()
6 return VoiceChatService:IsVoiceEnabledForUserIdAsync(localPlayer.UserId)
7end)
8if success and enabled then
9 localPlayer.PlayerGui.MyVoiceGui.Enabled = true
10end
11
12

Parameters

userId: number

The UserId to check.


Returns

If that user has voice enabled.