There is currently no way to stop a message from being delivered to a player on the Client Side. We are currently able to modify the message properties via OnIncomingMessage callback but not able to stop the message from being delivered. Without this function, we are unable to create a “soft ban” system in the chat system where the player sending the message can see it but other players are unable to see the message.
I don’t really understand TextChatService much, but can’t you just stop the message from sending but then send an event to the client to replicate their message
and you can use that as a reference to use for it ig.
Unfortunately, with this solution you lose the ability to click on a player’s username to start whispering to them. Plus DisplaySystemMessage
doesn’t filter the messages so you’ll need to set up your own filtering code with the use of TextService and even then, I personally doubt Roblox would allow you to even manually use TextService for filtering since that defeats the point of being required to use TextChatService in the first place, although I’m no lawyer so that isn’t legal advice.
Are you sure about this? Using the server ShouldDeliverCallback
callback to return false will deny all other clients from recieving the message; the client who sent the message will continue to see their message regardless.
Still would be nice to be able to hide messages on the client though.
You can either use TextChannel.PlayerName.CanSend
on the server or use TextChatService.OnIncomingMessage
and set TextChatMessageProperties.Text
to " "
. You must include a single whitespace for it to not show up (though, there is a bug where it still notifies you for a message if the chat is closed). You just would have to check if TextSource.UserId
is the same as the soft banned player!