Help with Chat tag [CHAT SPEAKER FUNCTION]

Hello there Developers,

I released yesterday my obby and made a chat tag via a Player UserId.

I want to do it with the GroupId and the RankNumber can somebody help me with this? I will set under this text/message te script that i used and can somebody change it then for me please?

local Players = game:GetService("Players")
local chatService = 
require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local tags = {
   [118001742] = {TagText = "Lead-Developer", TagColor = Color3.fromRGB(13, 105, 172)},
   [545471108] = {TagText = "Developer", TagColor = Color3.fromRGB(13, 105, 172)}
}

 chatService.SpeakerAdded:Connect(function(playerName)
 local speaker = chatService:GetSpeaker(playerName)
 local Player = game.Players[playerName]

if tags[Player.UserId] then
	speaker:SetExtraData("Tags", {tags[Player.UserId]})
   end
end)

Thanks for helping already!

Greetings.

1 Like