Issue With ChatServiceRunner and ChatService

Hello there, been trying to debug a system to add chat tags to a player’s name in chat.
This system is attempting to use the module ChatService, but returns an infinite yield, and doesn’t move past this.

I’m unsure as to how to fix this, and have been trying multiple things the past few hours.

Is there a better way to go about this?

local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local setChatTagEvent = ReplicatedStorage:WaitForChild("SetChatTag")

local playerTags = {}

local function onEventFire(player, tag)
	print("SetChatTagServer Debug")
	playerTags[player.UserId] = tag
	print(player.Name .. " has selected the chat tag: " .. tag)


local function onMessageSent(speaker, messageObject)
	local userId = speaker.UserId
	if playerTags[userId] then
		messageObject.Message = "[" .. playerTags[userId] .. "] " .. messageObject.Message

ChatService:RegisterProcessCommandsFunction("addTag", onMessageSent)

1 Like

Try enabling the LegacyChatService by going to TextChatService.ChatVersion.

Im assuming this is for the old chat system as their are modules to apply tags for said system that are easier to add with the new system.


I believe the ChatServiceRunner has been deprecated by default and is no longer being used.
It’s recommended to avoid using deprecated features so I advise you to use the newer TextChatService. It features the same functionality you are looking for.