I’m creating a chat tag script. The chat tags work fine on the message sender’s client, but the messages don’t even show up on anyone else’s clients. I know that it’s the chat tag script doing this because it works when the script is disabled.
local textChatService = game:GetService("TextChatService")
local marketplaceService = game:GetService("MarketplaceService")
textChatService.OnIncomingMessage = function(message: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
if message.TextSource then
local player = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)
if marketplaceService:UserOwnsGamePassAsync(player.UserId, 679979282) then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> "..message.PrefixText
if player:IsInGroup(13997630) then
local Rank = player:GetRankInGroup(13997630)
if Rank == 1 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[😎 Fan]</font> "..message.PrefixText
elseif Rank == 2 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[🔨 Contributor]</font> "..message.PrefixText
elseif Rank == 3 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[🎮 QA Tester]</font> "..message.PrefixText
elseif Rank == 4 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[🛠️ Developer]</font> "..message.PrefixText
elseif Rank == 253 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[🎨 Lead Game Designer]</font> "..message.PrefixText
elseif Rank == 254 then
properties.PrefixText = "<font color='#FF282C'>[👑 VIP]</font> ".."<font color='#00E7FF'>[🛠️ Lead Developer]</font> "..message.PrefixText
end
end
elseif player:IsInGroup(13997630) then
local Rank = player:GetRankInGroup(13997630)
if Rank == 1 then
properties.PrefixText = "<font color='#00E7FF'>[😎 Fan]</font> "..message.PrefixText
elseif Rank == 2 then
properties.PrefixText = "<font color='#00E7FF'>[🔨 Contributor]</font> "..message.PrefixText
elseif Rank == 3 then
properties.PrefixText = "<font color='#00E7FF'>[🎮 QA Tester]</font> "..message.PrefixText
elseif Rank == 4 then
properties.PrefixText = "<font color='#00E7FF'>[🛠️ Developer]</font> "..message.PrefixText
elseif Rank == 253 then
properties.PrefixText = "<font color='#00E7FF'>[🎨 Lead Game Designer]</font> "..message.PrefixText
elseif Rank == 254 then
properties.PrefixText = "<font color='#00E7FF'>[🛠️ Lead Developer]</font> "..message.PrefixText
end
end
return properties
end
end