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.
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