How to make a chat tags script for minimum number

I have this script right here, but I do not know how to make it like number ranks

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

    local speaker = chatService:GetSpeaker(player)
    speaker:SetExtraData("Tags",{{TagText = players[player]:GetRoleInGroup(11392204)}})
1 Like

Not working, It’s giving me error, and etc.

I don’t believe that’s how indexing works.
You can only index based on the name of an object. Is the player an instance or a string?

That is the group id, that how I put it on.

Nothing to do with the group id, look closer.

This is the problem. If the player is an instance this will cause an error.