Hello, I have been messing around with text chat service lately, and I’ve tried making colored prefixes for admins and vips, but whenever anyone sends a message, it is only visible to the person that sent the message. And even worse, the chat message filter is not working.
I have only changed appearance of the chat, I haven’t touched channels or anything…
This is the OnIncomingMessage script in StarterPlayerScripts:
TCS.OnIncomingMessage = function(msg: TextChatMessage)
local Properties = Instance.new("TextChatMessageProperties")
local Color = Color3.new(0, 0.45098, 1)
if msg.TextSource then
local Prefix = ""
local p = game.Players:GetPlayerByUserId(msg.TextSource.UserId)
local Staff = p:GetAttribute("Staff")
if Staff then
local C = StaffC[string.upper(Staff)]
Prefix = string.format("<font color='#%s'>[%s]</font> ", C:ToHex(), string.upper(Staff))
elseif p:GetAttribute("VIP") then
Prefix = "<font color='#F5CD30'>[VIP]</font> "
end
Properties.PrefixText = Prefix..string.format("<font color='#%s'>%s</font>", Color:ToHex(), msg.PrefixText)
end
return Properties
end
Any help appreciated!