Player.Chatted does not fire when using TextChatService in a LocalScript

When using TextChatService, Player.Chatted does not fire in a LocalScript when the LocalPlayer chats. Player.Chatted fires on the server regardless of the ChatVersion, but only fires on the client when using LegacyChatService. I know there are other ways to determine if a player chatted on the client when using TextChatService, but the documentation doesn’t say anything about not being able to use Player.Chatted on the client with TextChatService.

Repro
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")

Players.LocalPlayer.Chatted:connect(function(msg)
	print(player, "said", msg)
end)

warn("Using TextChatService?", TextChatService.ChatVersion == Enum.ChatVersion.TextChatService)
Screenshots


Depending on your use case, you may have to use TextChatService. They have MessageReceived and SendingMessage. Those could possibly help you out.

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes

Hi, thanks for reporting this bug. This sounds unintended, but we recommend using the TextChatService APIs as @zachup100 mentioned as those are being more actively maintained. TextChatService:MessageReceived is intended for your use case.

2 Likes