I’m working on an experimental feature for my game. The concept is, if a player is attacked as they are typing in chat, it will immediately stop them from typing and send their message early. I don’t exactly know if that last part is possible (sending their message early), however I would still like to implement the feature to stop them from typing.
I’ve looked around the devforum for some topics, however they are all outdated, as I’m using TextChatService.
The mechanic is inspired from one of my favorite games on this platform, although they used a custom chat system to make it work. I’d like to know if this is possible with TextChatService, and if so, how could I implement it? Thanks!
You cant force player to chat, unless you have own chat system, but you still can stop them from typing, even tho i dont really like this solution: Put invisible TextBox into PlayerGui and call CaptureFocus and ReleaseFocus on it when player gets hit. Its pretty much working, but i noticed you need to put some delay between Capturing and Releasing, and you need to detect when player is actually typing into chat, not excatly sure how to do it but i think you can use UserInputService.InputBegan for that