Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make chat tags for group ranks without chat modules?

Asked by 4 years ago

I want it so, group ranks have their own chat tags, and I want it without chat modules.

0
Sorry on my answer i forgot something, it should work now. VitroxVox 884 — 4y

1 answer

Log in to vote
1
Answered by
VitroxVox 884 Moderation Voter
4 years ago
Edited 4 years ago

Hello i think this is what you're looking for:

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

ChatService.SpeakerAdded:Connect(function(player)
    local Speaker = ChatService:GetSpeaker(player)

 if Players[player]:GetRankInGroup(0000) == 25 then
        Speaker:SetExtraData('Tags', 
            {{TagText = "test1",
             TagColor = Color3.fromRGB(255, 0, 0)
            }})

   elseif Players[player]:GetRankInGroup(5196996) == 100 then
        Speaker:SetExtraData('Tags', 
            {{TagText = "test2",
             TagColor = Color3.fromRGB(255, 0, 0)
            }})

    end
end)

--[[

 elseif Players[player]:GetRankInGroup(groupid) == ranknumber then --this checks if the user is this rank in the group you provided the script
        Speaker:SetExtraData('Tags',  --this adds the tag to the user's chat
            {{TagText = "Theranktag", -- this is the tag itself
             TagColor = Color3.fromRGB(255, 0, 0)  --tags color
            }})
]]

And you can keep on adding "rank tags" by copy & pasting the line of code that i said.

if it worked please accept, thank you.

0
this is a serverscript btw remember. VitroxVox 884 — 4y
Ad

Answer this question