Hi! So I have a title system where when you chat it’s suppose to say the tag that you have, your rank in the group and then your username. However, only one tag appears, your rank tag and not your group tag. Is there anyway to give 2 tags?
local plrs = game.Players
local sss = game.ServerScriptService
local groupId = 10395117
local chatService = require(sss:WaitForChild('ChatServiceRunner'):WaitForChild('ChatService'))
local titleHandler = require(script.Parent.Parent:WaitForChild("Modules"):WaitForChild("TitleHandler"))
local titleStats = require(game:GetService("ReplicatedStorage"):WaitForChild("GameClient"):WaitForChild("Modules"):WaitForChild("Utilities"):WaitForChild("TitleStats"))
local Colours = {
Fans = Color3.fromRGB(255, 255, 0),
Tester = Color3.fromRGB(0, 255, 0),
Youtubers = Color3.fromRGB(255, 0, 0),
Contributor = Color3.fromRGB(0, 255, 0),
Investors = Color3.fromRGB(170, 85, 255),
Developers = Color3.fromRGB(0, 170, 255),
Owner = Color3.fromRGB(255, 0, 0)
}
chatService.SpeakerAdded:Connect(function(plr)
local speaker = chatService:GetSpeaker(plr)
plrs[plr].Chatted:Connect(function()
local CurrentRank = titleHandler:GetCurrentRank(plrs[plr])
if CurrentRank ~= "" then
if titleStats[CurrentRank] then
speaker:SetExtraData('Tags', {{TagText = CurrentRank, TagColor = titleStats[CurrentRank].Colour}})
elseif titleStats.SpecialTitles[CurrentRank] then
speaker:SetExtraData('Tags', {{TagText = CurrentRank, TagColor = titleStats.SpecialTitles[CurrentRank].Colour}})
end
end
end)
if plrs[plr]:IsInGroup(groupId) then
local PlayerRank = plrs[plr]:GetRoleInGroup(groupId)
speaker:SetExtraData('NameColor', Color3.fromRGB(0, 170, 255))
speaker:SetExtraData('Tags', {{TagText = PlayerRank, TagColor = Colours[PlayerRank]}})
local CurrentRank = titleHandler:GetCurrentRank(plrs[plr])
if CurrentRank ~= "" then
if titleStats[CurrentRank] then
speaker:SetExtraData('Tags', {{TagText = CurrentRank, TagColor = titleStats[CurrentRank].Colour}})
elseif titleStats.SpecialTitles[CurrentRank] then
speaker:SetExtraData('Tags', {{TagText = CurrentRank, TagColor = titleStats.SpecialTitles[CurrentRank].Colour}})
end
end
end