How do I make it so that while a player is chatting in the game chat, it won't activate a script that involves a key press?
✓ ANSWER ACCEPTED
Clicking keys while chat bar is open activates my script?
1 answer
✓ Accepted answer
Hi Wolf,
UserInputService comes with two parameters. The first one is the UserInput object, and the second is the game processed event. Just check that game processed event isn't true.
####Like this:
local uis = game:GetService("UserInputService");
uis.InputBegan:Connect(function(obj, gp)
if obj.KeyCode == Enum.KeyCode.Q and not gp then -- The 'not gp' part makes sure that it wasn't a game processed event, as in it wasn't clicked while typing.
-- Whatever
end
end)
##Well, I hope I helped and have a wonderful day/night.
Thanks,
Best regards,
~~ KingLoneCat
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Yo lone cat teach me how to make text big
What do u mean?