Chat-tag script -PROBLEM

Hello everyone, this is my first time making a topic. anways let begin!
hello i made this script:

local Players = game:GetService(“Players”)
local ChatService = require(game:GetService(“ServerScriptService”):WaitForChild(“ChatServiceRunner”).ChatService)
local userid = “2219805047”

local function addChatTag(player)
local speaker = ChatService:GetSpeaker(player.Name)
if speaker then
speaker:SetExtraData(“Tags”, {{TagText = “[Owner]”, TagColor = Color3.fromRGB(255, 255, 0)}})
end
end

Players.PlayerAdded:Connect(addChatTag)

And i it didn’t work for some reason - if you can help thank you so much!

What is this? This is probably the root of the problem- is this a module? Why are you using that instead of the regular ChatService?

Also, do you have the new TextChatService enabled? If so, the old Chat service won’t work- follow up and I will give instructions on how to do this.

1 Like

(didnt see the solution while typing this, mb) instead of PlayerAdded, it should be SpeakerAdded,

local Players = game:GetService(“Players”)
local ChatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local userid = game.CreatorId

local function addChatTag(name)
    local player = game.Players[name]
    if player.UserId == userid then
    local speaker = ChatService:GetSpeaker(name)
        if speaker then
            speaker:SetExtraData("Tags", {{TagText = “[Owner]”, TagColor = Color3.fromRGB(255, 255, 0)}})
        end
    end
end

ChatService.SpeakerAdded:Connect(function(addChatTag)
1 Like

@Fizzitix I tried you’re idea it worked thank you so much!
i am a new scripter that why it explaubs why im so bad at scripting. once again thank you so much!

1 Like

@Frostholl I’ma try you’re idea aswell!

I tried you’re suggestion it didn’t work!