Making Bubble Text and Chat Text Different Colors

I want to make it so the Text inside the new TextChatService UI changes color, but the Chat Bubble’s Text Color doesn’t. (Not The Chat Bubble Itself)

My Current Code
local TextChatService, Players = game:GetService("TextChatService"), game:GetService("Players")

TextChatService.OnIncomingMessage = function(message: TextChatMessage)
	local Properties = Instance.new("TextChatMessageProperties")

	if message.TextSource then
		local player = Players:GetPlayerByUserId(message.TextSource.UserId)
		Properties.Text = "<font color='#d91695'>".. message.Text.. "</font>"

	end
	return Properties
end

Instead, Bubble Text’s Color should be:

image

I’ve been looking for solutions to this, but I could only find this yet this doesn’t provide a valid solution to my problem, am I doing something wrong? I can’t find anything on the Documents.

4 Likes

This is still not fixed since I posted about it in the post you linked and as far as I’m aware it is still not possible to change the color of the chat and bubble text independently using TextChatService. The reply from badcc suggests why the issue may be happening.

1 Like

For now, I’ve decided to try and reach out to an administrator on the forum that possibly had something to do with TextChatService, but I’d love a #bug-reports post to be created, as this probably is unexpected behavior.

1 Like

You can customize everything look here:




image

I believe you used the editing of the colors with the setting values of TextChatService properties, but using the script to set these will cause both colors to change, despite the initial one only being for UI Chat not Chat Bubbles.

Can you send me your place file?

There is genuinely nothing more needed to the file, all you need to do is insert the Current Code into a Local Script and put it into StarterPlayerScripts.

But if you must,
codeexample.rbxl (52.7 KB)

Currently, the only solution I can find is manually calling Chat, which will be my solution for now.
Actually, No. This doesn’t even work if you want it to respect the Configuration, as if you disable the configuration it wont respect it, and if you enable it it will cause the chat bubbles themselves to appear. I’m stuck.

The problem happens because using <font> overrides also the color from the bubble chat, leading to this issue. I have found a solution, but it triggers an error message, stating something like “Your message couldn’t be delivered.”

And what type of fix would that be, the current “hacky” solution to this would be the following:

local Players, Chat, TextChatService = game:GetService("Players"), game:GetService("Chat"), game:GetService("TextChatService")

TextChatService.BubbleChatConfiguration.AdorneeName = "BubbleRemover"

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Attachment = Instance.new("Attachment", Character.Head)

		Attachment.Name = "BubbleRemover"
		Attachment.WorldCFrame = CFrame.new(math.huge, math.huge, math.huge)

		Player.Chatted:Connect(function(Message)
			Chat:Chat(Character.Head, Message)
		end)
	end)
end)
1 Like