Is there any way to mute all players' chat temporarily?

How can I mute all chat for every player temporarily? I also want to be able to hide all bubbles sent before doing the disabling.

I know about SetCoreGui, but that’s client-sided, and I don’t want this to be exploitable. Is there any server-sided way to temporarily disable everyone’s chat?

1 Like

If you’re using TextChatService (which you probably should be, since they’re getting of the legacy system), you can block any chat messages from being sent by using TextChannel.ShouldDeliverCallback.

If you want to hide the chat window, the only way to do that is SetCoreGuiEnabled - there’s no getting around that (and, even if you could hide the chat GUI from the server, an exploiter could easily just unhide it for themselves).

For the bubble chat, you might be able to hide it by setting TextChatService.BubbleChatConfiguration.Enabled. Not 100% sure if that will hide existing chat bubbles, though.

2 Likes

Thank you, this worked perfectly. The bubbles no longer appear and the chat messages no longer deliver.

Here’s my function’s implementation for anyone who’s wondering:

function ModeUtilities.MutePlayers(playersList: {Player}, muteValue: boolean)
	muteValue = muteValue ~= false

	RBXGeneralChannel.ShouldDeliverCallback = not muteValue
	TextChatService.BubbleChatConfiguration.Enabled = not muteValue
	
	for _, player in playersList do
		local audioDeviceInput = player:FindFirstChildOfClass("AudioDeviceInput")
		if audioDeviceInput then
			audioDeviceInput.Muted = muteValue
		end
	
		Remotes.DisableChat:FireClient(player, muteValue)
	end
end