I’m attempting to create a VIP chat tag script. However, I’m experiencing an error:
- SpeakerAdded is not a valid member of ModuleScript "ServerScriptService.ChatServiceRunner.ChatService"
I’ve gone as far as copying and pasting source code from tutorial videos and am still running into this issue with SpeakerAdded
. Is there something obvious I’m missing in my code?
wait(5)
local CHAT_SERVICE = game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")
CHAT_SERVICE.SpeakerAdded:Connect(function(PLAYER_NAME)
wait(5)
local PLAYER = game.Players:FindFirstChild(PLAYER_NAME)
if PLAYER then
if PLAYER.modstats.Gold.Value == true then
local SPEAKER = CHAT_SERVICE:GetSpeaker(PLAYER_NAME)
SPEAKER:SetEatraData("ChatColor", Color3.fromRGB(239, 184, 56))
SPEAKER:SetExtraData("Tags", {{
TagText = "GOLD",
TagColor = Color3.fromRGB(239, 184, 56)
}})
end
end
end)
Help appreciated and happy developing!