Need help with name editing, word coloring, and local chat with textservice

Hey, I’m working on a chat-based game (similar to ChatVenture) and I’m trying to figure out some customizations with TextChatService:

  1. Change how a player’s name shows up in chat.
  2. Make certain keywords (like commands) appear in gold.
  3. Only let players see chat messages from others in their area (client-side filtering).

My questions are:

  1. Can I intercept/modify messages before they register?
  2. Is there a way to recolor parts of the message text (not just the whole thing)?
  3. What’s the best way to handle area-based/local chat with TextChatService?

Thanks

I believe you can via the OnIncomingMessage callback.

You’ll have to use RichText for that.

I’m a little more stumped on this one. I believe creating proximity chat is a little more strenuous since they’ve created the new TextChatService. I’m unsure if there’s a way to get the default channel aside from doing it directly e.g. TextChatService.TextChannels.RBXGeneral, but you would need to use ShouldDeliverCallback. It’d be as simple as comparing two players’ regions or character distances.