Hey everyone, so I made a script to change the players messages to look better if they are premium but it interferes with my bubble chat making the text white so you cant see it on the bubble chat. Is there anyway I can make it so it doesn’t interfere?
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
if message.TextSource and message.TextSource.UserId then
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if player then
if player.MembershipType == Enum.MembershipType.Premium then
properties.PrefixText = "<font color='#FF0000'><b>[PREMIUM " .. utf8.char(0xE001) .. "]</b></font> " ..
"<font color='#D3D3D3'>" .. player.DisplayName .. ":</font>"
else
properties.PrefixText = "<font color='#D3D3D3'>" .. player.DisplayName .. ":</font>"
end
else
properties.PrefixText = "<font color='#D3D3D3'>Unknown Player:</font>"
end
properties.Text = "<font color='#FFFFFF'>" .. message.Text .. "</font>"
end
return properties
end