how do i fix the userinputservice input while typing on a textbox or chatting? everytime i chat or type something on textbot the userinputservice presses
1 Like
Idk what your code is but ill give an example of a way to do it
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, IsTyping)
if isTyping then
return
end
-- input goes here
1 Like
When calling a UserInputService event such as InputBegan, the event will return 2 parameters: inputObject and gameProcessedEvent
Whenever a user is chatting or on the roblox menu, gameProcessedEvent will return true
To avoid running any code for input detection when the user is chatting, do an if statement to check if gameProcessedEvent is false.
game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent)
if not gameProcessedEvent then
--run code here
end
end)
2 Likes
thank you! it worked very well