local gamepassId = 154681540
local service = game:GetService("MarketplaceService")
local tagColor_ = Color3.fromRGB(255, 170, 127)
local chatColor_ = Color3.fromRGB(255, 170, 127)
local function onPlayerAdded(player)
if service:UserOwnsGamePassAsync(player.UserId, gamepassId) then
local tags = {
{
TagText = "⭐", -- Tag
TagColor = tagColor_
}
}
local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService)
local speaker = ChatService:GetSpeaker(player.Name)
speaker:SetExtraData("Tags", tags)
speaker:SetExtraData("ChatColor", chatColor_) -- Text Color
end
end
game.Players.PlayerAdded:Connect(onPlayerAdded)
I keep getting this error “Infinite yield possible on 'ServerScriptService:WaitForChild(“ChatServiceRunner”)”, how do I fix it?