Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

UIS detecting input when player is chatting?

Is there anyway to stop User Input Service from activating when a player is typing? I know there is but I can't remember how to do it.

Thanks for reading

2 answers

✓ Accepted answer
game:GetService("UserInputService").InputBegan:connect(function(input,processed)
	-- code
end)

There are two arguments given with an inputbegan function. The first, input, just gives you the input, whilst the one I have put as processed checks if the game is processing it (i.e. chatting). Therefore, you'd just check if it wasn't processed by the game with, if not processed then.

Yes, you can use something like gameProcessedEvent , which i use alot. An example is shown here:

UIS.InputBegan:Connect(function(Input, gameProcessedEvent)
if not gameProcessedEvent then -- detects if the player is typing
-- rest of your code
end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.