cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 21 Jul 2015 06:30 PM |
Using the UserInputService, I noticed that when a player presses a button while chatting, it still counts.
What I want to do is have it to where the player presses 'e' then it will open up an inventory gui.
But if the player types in (for example) 'Help' then that would count as pressing 'e'
How can I fix this? |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 21 Jul 2015 06:51 PM |
| Should I instead use the deprecated function Mouse.KeyDown:connect()? |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2015 06:53 PM |
| ^ I still use it, and it works perfectly. I would. |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 21 Jul 2015 06:54 PM |
| userinutservice returns a bool "gameprocessedevent" check if it's true |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2015 06:55 PM |
Or you could do:
Player = game.Players.LocalPlayer Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(Key) if Key == "e" then --Code end) |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 21 Jul 2015 06:56 PM |
NO KEY DOWN IS TRASH SHUTUP
UIS RETURNS A BOOL IF THEY ARE CHATTING OR SOMETHING. IF IT'S FALSE THEN THEY ARE CHATTING. IF IT'S TRUE THEY'RE NOT CHATTING |
|
|
| Report Abuse |
|
|
| |
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 21 Jul 2015 06:59 PM |
UserInputService.InputBegan:connect(function(input,gpe) if not gpe then ... end end)
|
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|