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.
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