I’m using the new text chat system from here: https://devforum.roblox.com/t/new-in-experience-text-chat-system-public-release/1848837
From scripting help servers I learned that the reason why my chat tag prefix isn’t working is because of the new chat, there’s no ChatServiceRunner in ServerScriptService anymore, which means my following code won’t work (there’s an error saying
Infinite yield possible on 'ServerScriptService:WaitForChild("ChatServiceRunner")' - Studio
Here is my server script in serverscriptstorage:
local Players = game:GetService("Players")
local service = game:GetService("MarketplaceService")
local gamepassId = 25949990
local developers = {"DinoViotto", "FizzyColas", "rvsita", "ashhchuu"}
local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner").ChatService)
ChatService.SpeakerAdded:Connect(function(player)
local Speaker = ChatService:GetSpeaker(player)
for _, v in pairs(developers) do
if Players[player].Name == v then
Speaker:SetExtraData('Tags', {{TagText = "[🔨] [Developer]", TagColor = Color3.fromRGB(229, 212, 21)}})
end
end
if service:UserOwnsGamePassAsync(player.UserId, gamepassId) then
Speaker:SetExtraData('Tags', {{TagText = "[👑] [VIP]", TagColor = Color3.fromRGB(212, 175, 55)}})
end
end)
so how can I make this script work with the new chat?
any help is appreciated!