Player.Chatted doesn't work, what other alternatives are there?

I have an admin system that checks what a player chats and then sends it to the client, but since my game isn’t using LegacyChat anymore this doesn’t work.

I’ve tried different alternatives using TextChatService.MessageRecieved but that didn’t work neither.

The only thing that seems to work is TextChatService.OnIncomingMessages but I wouldn’t want to use that to run commands on the client as it might become risky.

All I want to do is actually check what a player chats on the server, then fire it to the client.

1 Like

The only callback I know the server can utilize is TextChannel.ShouldDeliverCallback, which provides a TextChatMessage as one of the parameters. This callback isn’t really intended to be used in this way, and you’ll have to account for it triggering for every player receiving the message as well as needing to return true at the end of the function to ensure the message still gets delivered to the intended client.

There might be a better method that someone else comes up with I haven’t heard of, but this is all I can offer to help at the moment.

Using TextChatCommands is probably the intended solution (by Roblox’s standards), but the aforementioned ShouldDeliverCallback is probably more in-line with what you want. I believe you can also use the TextChatService.SendingAsync event and have a remote pass the command to the server, but that’s a bit expensive.

1 Like