Hello everyone, I’ve encountered an unusual bug while attempting to implement chat tags for messages. This script seems to have an issue that causes messages from other players to appear as if they were sent by yourself.
local TextChatService = game:GetService("TextChatService")
local Properties = Instance.new("TextChatMessageProperties")
local MarketPlaceService = game:GetService("MarketplaceService")
TextChatService.OnIncomingMessage = function(Message: TextChatMessage)
print(Message)
if Message.TextSource then
local player = game:GetService("Players"):GetPlayerByUserId(Message.TextSource.UserId)
local playerGroupRank = player:GetRankInGroup(17258922)
if playerGroupRank == 1 then
Properties.PrefixText = '<b><font color="#42f57b">[🌎 FANS]</font></b>' .. Message.PrefixText
elseif playerGroupRank == 2 then
Properties.PrefixText = "<b>" .. '<font color="#2BC0FF">' .. "[🪐 TESTER]" .. "</font> " .. "</b>" .. Message.PrefixText
elseif playerGroupRank == 3 then
Properties.PrefixText = "<b>" .. '<font color="#D82413">' .. "[📕 DEVELOPER]" .. "</font> " .. "</b>" .. Message.PrefixText
elseif playerGroupRank == 255 then
Properties.PrefixText = '<b><font color="#EFAA49">[✨ OWNER] </font></b>' .. Message.PrefixText
end
if game:GetService("Players"):GetPlayerByUserId(Message.TextSource.UserId):GetAttribute("VIP") == true then
Properties.PrefixText = "<b>" .. '<font color="#EFAA49">' .. "[👑 VIP] " .. "</font> " .. "</b>" .. Message.PrefixText
end
return Properties
end
end
Any ideas why? This is an example pic I made. usually the name color is different however the name displayed is the same as the local player name. Ty