Hello! So I’m trying to use a custom input textbox for a game, and I want to stick with Roblox’s chat scripts. I configured the ChatInputBarConfiguration.Textbox
to my own textbox, and chat works when you click on the textbox and type your message, then click enter.
The problem I’m having is that the hotkey used in chat (default /
for US) isn’t being registered to the textbox, and isn’t working. I also attempted to manually check if the hotkey is pressed using UserInputService
but I get an error:
Cannot use :CaptureFocus() on a TextBox that is reserved for TextChatService.ChatInputBarConfiguration.
Replication Steps
- In an empty or used studio, create a ScreenGui and add a Textbox inside
- Create a local script inside of StarterGui and enter the following code (configuring
ChatInputBarConfiguration.Textbox
for PlayerGui)
game.TextChatService:FindFirstChild("ChatInputBarConfiguration").TextBox = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextBox
-
Ensure behaviour properties are as followed:
-
Attempt to play the game and chat. You will notice that the slash hotkey to focus the chatbox does not work, but chat works as intended.
The video below demonstrates me attempting to use the slash hotkey. Two things occur, one being that the textbox doesn’t focus as its intended to, and second is that an error occurs when I want to manually detect when a hotkey is pressed and when I manually want to capture focus of the textbox.
A post reply was made by a Roblox staff member regarding this, which led me to believe that it may be a bug:
In summary, using a custom textbox doesn’t allow me to use chat hotkeys including /
to type. Not sure if I’m doing something wrong on my end, or if this is a bug.
Specs:
I’m using a 2020 Macbook Pro M1 (with the latest update installed) with the latest version of Roblox Studio installed. If you require any more information regarding my specs, please let me know. Thanks!