I’m working on a region-based chat that uses
MessagingService where players are able to select their preferred region and chat with others in the same subscribed Topic. Because of the possible broad range of recipients of the message, I’m using
I tested my chat by sending some words that are a little unsavory for the nature of this site so I’ll leave them to the imagination; the end problem is that in the console/output, the filtered message will show the whole word and not have it show up as hashes.
Here is a snippet of my code:
CrossMessageService is a module that I made that uses
PLAYER.Chatted:Connect(function(MESSAGE) if SENT_MESSAGES < MESSAGE_LIMIT and MUTED == false then local TRUE_MESSAGE = CHATSERVICE:FilterStringForBroadcast(MESSAGE,PLAYER) print(TRUE_MESSAGE) --I have a separate print line in the ProcessMessage function below but I added this here for clarity CROSSMESSAGESERVICE:ProcessMessage(PLAYER,TRUE_MESSAGE,TRUE_CHANNEL) else --print('at message limit or player has been muted') end SENT_MESSAGES = SENT_MESSAGES+1 end)