How to Toggle the Roblox Chat Window?

Remember this?

local ChatService = game:GetService("Chat")
local StarterGui = game:GetService("StarterGui")
ChatService:RegisterChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, function()
	return {BubbleChatEnabled = true, ClassicChatEnabled = game.ReplicatedStorage.GameConfigurations.ChatWindowEnabled.Value}
end)

This works 100%, but I want to make it toggleable. The problem is that there is not ChatCallback to allow for a manual toggling and the other Enums used in the first argument of the RegisterChatCallback function does not work.

Is there any way to make this toggleable? I am very new to the Chat API and I couldn’t figure this one out unfortunately.

2 Likes

The chat window is a CoreGui, which can only be toggled on and off through StarterGui and therefore applies to all players. As far as I’m aware (and there may be a more obscure method I’m not aware of), there is no way to toggle it on or off for a single player at this time.

An alternate solution would be to make your own chat window, which you would then be able to enable/disable whenever you want.

2 Likes

You don’t even need to make your own chat window and stuff like that, you can just fork the Roblox chat modules and make it so that it will be toggleable.

1 Like

Make the script disabled when it is off, and enabled when it’s on.

I am afraid I will have to fork the chat

Don’t worry, forking the chat and working on your own isn’t all that hard in reality!

It’s more because I won’t get any of the new automatic chat updates that roblox dishes out. Of course, I could re-fork the chat per update but I ended up making my own chat system instead.

They don’t really push updates to it all that often.

1 Like