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

I'm trying to make a chat tags system for people who bought V.I.P, but it dosen't work, any fixes?

Asked by
Stea_my 48
5 years ago

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)`

0
Please use a codeblock sheepposu 561 — 5y
0
i did, it glitched Stea_my 48 — 5y
0
well, a player's name isnt the same when you add VIP on the end, say Jeff doesn't equal JeffV.I.P theking48989987 2147 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

ServerScriptService.ChatServiceRunner:GetSpeaker

Assuming speakerrefers 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)}})

Ad

Answer this question