How to send messages on new chat?

In my game I have a system where a player would collect an item it would notify them by sending a chat message of the item they received in a special color. With the new chat update, the method seems to not work anymore. Anyone know the new way of implementing a chat message?

2 Likes

Most likely you are talking about TextChatService and sending a system message to a channel.
Docs: TextChannel | Documentation - Roblox Creator Hub
Example:

--client!!! Use RemoteEvent if you need send message from server
local channel = game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
channel:DisplaySystemMessage("<font color='rgb(0, 136, 255)'>Test message</font>")

Or

--client
local channel = game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
event.OnClientEvent:Connect(function(msg)
	channel:DisplaySystemMessage(msg)
end)
--server
event:FireClient(plr, "<font color='rgb(0, 136, 255)'>Test message</font>")

It supports RichTextMarkup

game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage()

1 Like

I’m confused on how to make the message colored.

(the bottom code is my old)

remotes.SendMessage.OnClientEvent:Connect(function(item,rarity,message)
	local channel = game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
	
	
	
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = message; 
		Color = colors[rarity]
	})
end)

@3YbuKtOp already posted the link to the documentation for Rich Text Markup… Read the article, you should understand after.

1 Like

Ah okay. That’s super confusing.

1 Like

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