Why doesn't the tag appear in the player?

I want to make a tag that appears next to the user in the chat
when I put the script and tested it it didn’t work

mod

scrip:

wait(2)
local ScriptSV = game:GetService("ServerScriptService")
local ChatSV = 
require(ScriptSV:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local Players = game:GetService("Players")

local MOD = {
'jesus2017tec38'
}

ChatSV.SpeakerAdded:Connect(function(playerName)
local Speaker = ChatSV:GetSpeaker(playerName)
for i, b in pairs(MOD) do
	if Players[playerName].Name == b then
		Speaker:SetExtraData('Tags', {
			{
				TagText = "MOD",
				TagColor = Color3.new(0.576471, 0.0313725, 0.0392157)
			}
		})
	end
end

what I want is to make a tag for mods for my game
any help would be greatly appreciated :wink:

Please use a code block, it’s extremely hard to read without it.

1 Like

Make sure the code below is in a script in ServerScriptService
Try this code:

   wait(2)
local ScriptSV = game:GetService("ServerScriptService")
local ChatSV = 
	require(ScriptSV:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local Players = game:GetService("Players")

local MOD = {
	"jesus2017tec38",
}

ChatSV.SpeakerAdded:Connect(function(playerName)
	local Speaker = ChatSV:GetSpeaker(playerName)
	for i, b in pairs(MOD) do
		if Players[playerName].Name == b then
			Speaker:SetExtraData('Tags', {
				{
					TagText = "MOD",
					TagColor = Color3.new(0.576471, 0.0313725, 0.0392157)
				}
			})
			end
		end
	end)
1 Like