Team chat channel custom colour

I have searched on the Devforum far and wide…
Yet to no avail.

Let me explain what I want to happen:

  • Player A goes into team chat (/t or /team)
  • Player A talks to Player B in team chat
  • Player A’s chat bubbles text should be the team colour and the background of the bubble black.
  • Player B sees that the text chat is in team chat via the visual indications.

Using Roblox’s new TextChatService is is possible? I have done something similar using legacy chat before but I’ve upgraded systems to new chat due to the cutting off chat bug.

i.e.

BubbleChatSettings.UserSpecificSettings [plr.UserId] = {BackgroundColor3 = normbg, TextColor3 = normt,TextSize = 18,Font = Enum.Font.SourceSans}

But to my knowledge this doesn’t work in roblox’s new chat no more?
Anyone got any isues on how this system can work?

1 Like

Bumping this to see if anyone knows, also I know roblox is down but I’m mainly after either demo code or some direction here on what to do.

I have thought of making my own custom chat entirely but that is less than ideal…

1 Like

Read these docs, Customizing In-Experience Text Chat | Documentation - Roblox Creator Hub.

This is for the chat window not bubble chat.
Although let me try testing something with this:

1 Like

Alright - let me know if you need anything else.

1 Like

na all good ill add you add solution jus cuz why not

for anyone else wondering or coming across this:
this is for the NEW chat system

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

-- Event handler for when a new chat bubble is added to the experience
TextChatService.OnBubbleAdded = function(message: TextChatMessage, adornee: Instance)
	if string.find(message.TextChannel.Name,"Team") then -- if is in team chat
		print(`test`)
		-- Check if the chat message has a TextSource (sender) associated with it
		if message.TextSource then
			-- Create a new BubbleChatMessageProperties instance to customize the chat bubble
			local bubbleProperties = Instance.new("BubbleChatMessageProperties")

			-- Get the user who sent the chat message based on their UserId
			local player = Players:GetPlayerByUserId(message.TextSource.UserId)
			-- If the player is a VIP, customize the chat bubble properties
			bubbleProperties.TextColor3 = Color3.fromHex("#F5CD30")
			bubbleProperties.BackgroundColor3 = Color3.fromRGB(25, 27, 29)
			bubbleProperties.FontFace = Font.fromEnum(Enum.Font.PermanentMarker)
			
			return bubbleProperties
		end
	end
end

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