I am trying to detect inputs using UserInputService, but I want to ignore some inputs while the player is typing a message in chat or in a text box so that they don’t accidentally trigger something trying to type a message. I can’t find any solutions to this on the DevHub.
Consider this reply I made a while ago.
--//Services local UserInputService = game:GetService("UserInputService") if UserInputService:GetFocusedTextBox() then print("Player is in a text box") else print("Player is not in a text box") end
This will trigger the event for all TextBoxes, not just the chat bar.
In order to achieve your solution @zykobyte, you must check the name of the TextBox currently being typed in. Consider the link I replied.
Mine is what they want, re-read the post.
Ah I misread, apologies for my confusion.