How do I disable the in-game chat for console?

To make my game follow the Content Agreement of console, I want to disable the in-game chat for all console users. How can I do that?
image

You can call SetCoreGuiEnabled of StarterGui to toggle CoreGuis. If you want to disable the chat, you can call it with Enum.CoreGuiType.Chat like so:

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

If using the default Lua chat, this will be done for you. CanChatWith will return false for all console users, as if chat was disabled in their privacy settings.

3 Likes

As mentioned above, this should be done for you automatically. If it however is not, you are also free to disable the Chat CoreGui via SetCoreGuiEnabled. If you have a console branch of your game that console users play separately from the computer(/mobile) version of your game, the best idea is to prevent the chat scripts from loading at all with LoadDefaultChat.

2 Likes