I’m working on a Chat Tag system for my game where you can have Premium,Vip, or Moderator chat tags. The problem is if a player has more than one, for example the player is Premium and has Vip, either the vip or premium chat tag will show, not both. Is there a way that a player with both tags could have both in the chat, I dont really work with this type of stuff so some help would be appreciated.
heres the script
local vipID = 72771373 -- Gamepass ID
local service = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(player)
local tags = {
{
VipTag = "VIP",
VipColor = Color3.fromRGB(255, 217, 0)
PremiumTag = "Premium",
PremiumColor = Color3.fromRGB(182, 182, 182)
ModeratorTag = "Moderator",
ModeratorColor = Color3.fromRGB(241, 76, 76)
}
}
local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService)
local speaker = nil
while speaker == nil do
speaker = ChatService:GetSpeaker(player.Name)
if speaker ~= nil then break end
wait(0.01)
end
speaker:SetExtraData("Tags",tags)
speaker:SetExtraData("ChatColor",Color3.fromRGB(255, 255, 255)) -- Text Color
end
end)