masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 09 Dec 2013 08:27 PM |
| How does one read the input from a keyboard, And the values? |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 09 Dec 2013 08:28 PM |
mouse.KeyDown:connect(function(key) print(key.." was pressed") end)
..if that's what you mean, if not idk |
|
|
| Report Abuse |
|
|
masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 09 Dec 2013 08:32 PM |
How do i say this, what if i want to check if the person is pressing Ctrl and let's say O at the same time, how does one do that?
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 09 Dec 2013 08:36 PM |
event (key) if key == "t" and "o" then print ("player presgted t and o") end end) |
|
|
| Report Abuse |
|
|
masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 09 Dec 2013 08:54 PM |
| I keep getting "attempt to index global 'mouse'(A nil value)" is it supposed to be in a local or not? |
|
|
| Report Abuse |
|
|
masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 09 Dec 2013 09:02 PM |
| In local i get no print, and just a plain script i get Nil value. |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2013 09:04 PM |
| Did you define the mouse in the local script? |
|
|
| Report Abuse |
|
|
masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 09 Dec 2013 09:08 PM |
| No, I have no clue what define it as... |
|
|
| Report Abuse |
|
|
| |
|
moryo7
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 5028 |
|
|
| 09 Dec 2013 09:36 PM |
mouse.KeyDown:connect(function(k) if k == 'a' and 'b' then print("A and B pressed") end end)
✦мøяƴø子✦ |
|
|
| Report Abuse |
|
|
moryo7
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 5028 |
|
|
| 09 Dec 2013 09:36 PM |
Sorry, yeah, didn't define the mouse.
mouse = game.Players.LocalPlayer:GetMouse()
✦мøяƴø子✦ |
|
|
| Report Abuse |
|
|