Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

UIS detecting input when player is chatting?

Asked by
soutpansa 120
6 years ago

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

Log in to vote
0
Answered by 6 years ago
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.

Ad
Log in to vote
0
Answered by
oSyM8V3N 429 Moderation Voter
6 years ago

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)

Answer this question