So I'm trying to make a chat tag that says "V.I.P" when you buy the V.I.P gamepass, heres my code: `local mps = game:GetService("MarketplaceService")
local gpassid = 6426406
game.Players.PlayerAdded:Connect(function(player)
if mps:UserOwnsGamePassAsync(player.UserId, gpassid) then
tag1 = {player.Name.."V.I.P",Color3.fromRGB(255, 255, 0)}
tables = {tag1}
local tags = Instance.new("IntValue",player)
tags.Name = "Tags"
for i, v in pairs(tables) do
if player.Name == v[1] then
local tag = Instance.new("Color3Value",tags)
tag.Name = v[2]
tag.Value = v[3]
end
end
end
end)`
ServerScriptService.ChatServiceRunner:GetSpeaker
Assuming speaker
refers to a speaker object you have obtained, this is how you would add a red “VIP” tag:
speaker:SetExtraData("Tags", {{TagText = "VIP", TagColor = Color3.new(1, 0, 0)}})