Just to be clear—the existing /mute command does not accomplish what I want here.
Hi, I was wondering if anyone intimately familiar with the existing ChatService (also called the “ChatServiceRunner”) knows of an easy solution to muting people not just locally but for the whole server—WITHOUT forking the existing script Roblox provides. I don’t want to have to go back and update the script every few months when Roblox decides to overhaul its Chat feature again.
I was surprised by how little I could find on this topic: just one lousy old thread. It seems like a must-have for many games as well, as being able to mute wide swaths of a server can be very important for Murder Mystery or Hide and Seek style games. My goal is to be able to have my own
:mute command that admins in my game can use to make certain users stop spamming in the chat.
Thanks in advance.
Just need to require the “ChatChannel” module under ServerScriptService > ChatChannel
Yes! It is possible. You can mute the speaker from the channel via the Lua Chat System.
I got it now. Yes, it has to do with channels. While the replies here could still be more helpful by being specific about what to do, for future readers I will explain how this works.
Roblox’s chat system is designed to be modifiable without having to fork it.
Any changes you want to make are done by simply requiring the ChatService ModuleScript here: Changes can be done in many ways with the default Roblox chat, see this thread for more info. In our case, we only want this module:
Once you’ve done that, you can do this to get the main chat that people use to talk:
local MainChat = ChatService:GetChannel("All")
All is the name of the default chat channel that people talk in. System messages, team messages, and (I assume) whisper messages are handled in separate channels. I think it was designed this way for modifiability.
If you want to mute someone, it’d look something like this:
I couldn’t figure out how to prevent people from whispering though, as no “whisper” chat channel was displayed during my testing. Any additional help on that would be appreciated. Edit: Check the last post in this thread for something that actually has the ability to prevent whispers and such from getting through.
Have you found a way to stop people from whispering when they’re server-muted? This is really, really annoying…
Edit: Gonna have to fork the modules. Disappointing. Edited the PrivateMessaging module.
Something else chat-related that may be of interest to you is this:
It does (somehow) prevent team and whisper chat from reaching through as well. A coincidence you reply to me at this time, as I was getting ready to make a forum post about how to use my ShadowMute module. Best of luck.
Figured I’d update you now that the forum post I mentioned is complete: ShadowMute - Mute people in chat without them knowing