How do I send a system message in the 'System' channel and not the 'All' channel?

I can’t find anything about this and want to figure out how.
image

How can I make it send “This is a system message” in the System channel and not All?

You may be looking at StarterGui:SetCore() under the section of ChatMakeSystemMessage

StarterGui:SetCore("ChatMakeSystemMessage", Table)

Try requiring the chat module first.

local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")) 

Then add a speaker bot for the system and make it join system chat

local speaker = ChatService:AddSpeaker("BOTNAME")  --(PROBABLY SYSTEM)
speaker:JoinChannel("System")

Next, just have the speaker say what you want!

speaker:SayMessage("Message","System")

To view system chat, players will have to say /c system unless you have some script setup to change the behaviour of it.

That sends it to the All channel, not System

That should work but it isn’t sending anything
It works in the All channel but not System

strange… how

did you make the tabs for the different chats, insight on that could help me answer

-- // Services
local Chat = game:GetService("Chat")

-- // Variables
local ClientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatSettings = require(ClientChatModules:WaitForChild("ChatSettings"))

-- // Code
ChatSettings.ShowChannelsBar = true

System is a specially managed channel that automatically mutes speakers that join it. Player speakers will see a red message in their chat window telling them they can’t speak in the system channel but non-player speakers don’t have an interface so the method ignores the SayMessage call.

You have to use the SendSystemMessage method for messages to show up there. Messages sent by this method can’t appear conventionally (in the format “[SpeakerName]: Message”). Most default system messages you see are from ChatSpeaker’s SendSystemMessage.

3 Likes

I’m assuming its not possible to only send the message in System. When I use the method you provided, it sends it in All as {System} Hello world!.

If you turn off EchoMessagesInGeneralChannel in Chat Settings, then yes you could. Whenever you see a message appear as {Text} Message, the curly braces describe which channel the message was sent in. This typically works for ChatSpeakers but system messages are also specially managed so not entirely sure - it’s been a while since I’ve worked with the internals of the Lua Chat System.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.