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

Why aren't the tags in chat not working?

Asked by
CodeWon 181
3 years ago

My script is supposed to give admins in my group a tag when they speak in chat, but it doesn't.

Error = "TagColor is not a valid member of Color3" - This error doesn't come from the script, but it comes from a defult script in chat serivce. But I think it has to be with my script.

Script:

01local ChatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
02 
03local tags = {
04    StaffTag = {TagText = "????", TagColor = Color3.fromRGB(239, 184, 56)}
05}
06 
07ChatService.SpeakerAdded:Connect(function(playerName)
08    local speaker = ChatService:GetSpeaker(playerName)
09    local player = game.Players[playerName]
10 
11    if player:GetRankInGroup(6153634) >= 4 then
12        speaker:SetExtraData("Tags", tags["StaffTag"])
13    end
14end)

1 answer

Log in to vote
1
Answered by
3F1VE 257 Moderation Voter
3 years ago
Edited 3 years ago

Try

1speaker:SetExtraData("Tags",{{TagText = "?????", TagColor = Color3.fromRGB(1,2,3)}})

Also is the script local or server?

0
Still got error CodeWon 181 — 3y
0
Still got error CodeWon 181 — 3y
0
I'll look further into this. 3F1VE 257 — 3y
0
Wait a second, I forgot 2 pairs of brackets, sorry! CodeWon 181 — 3y
Ad

Answer this question