Disabling Voice Chat for player

Hiya :waving_hand:

I’m wondering how to disable voice chat using something like:

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

To temporarily disable voice chat for the local player, but I can’t seem to find how to do that.

Any help is greatly appreciated.

Hey!
As far as i know, you can’t disable voice chat with a script in Roblox. SetCoreGuiEnabled only works for text chat, not voice.
Voice chat is managed by Roblox itself—there’s no API to turn it off locally for players.
Only way to disable it is in the player’s own Roblox settings.

2 Likes

While this used to be the case, it is not anymore if you’re using the new Audio API. Under any games using the Audio API (which should be all new ones as it is the default now), every player that isn’t the local player has an AudioEmitter in their character on the client. This audio emitter is where voice chat audio is emitted via a wire connecting the AudioEmitter to the AudioDeviceInput underneath the player.
Here’s a piece of code that could do what they’re asking (untested):

local players = game.Players
local player = players.LocalPlayer

for _,plr in pairs(players:GetChildren()) do
	if plr ~= player then
		local audioInput = plr:FindFirstChild("AudioDeviceInput")
		if audioInput then
			audioInput.Muted = true -- You could put "not audioInput.Muted" to flip it.
		end
	end
end

5 Likes

To disable VC, go to your Game Settings, then click on Communicate, and there should be something called, “Enable Microphone”

Hi. This is temporarily not for the whole game. :sweat_smile:

Oh, well I don’t have a solution then!

1 Like