Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
| |
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 07 Jul 2012 04:55 PM |
Use mouse.
In a hopperbin:
script.Parent.Selected:connect(function(m) m.KeyDown:connect(function(k) if(k == "k") then print("K was pressed.") end end) end) |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 04:56 PM |
script.Parent.Selected:connect(function(m) m.KeyDown:connect(function(key) key:lower() if(k == "l") then print("l was pressed.") end end) end) |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 07 Jul 2012 05:04 PM |
| @ninja, i get mostly of tat script, but what button do we have to press? |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 05:06 PM |
an eye "I" captial I but lower case |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 07 Jul 2012 05:10 PM |
Kk, but wha about this script:
function onKeyDown(key) if string.lower(key) == "a" then print("The a key was pressed!") else print("The "..string.lower(key).." key was pressed!") end end
script.Parent.Selected:connect(function (mouse) mouse.KeyDown:connect(function () onKeyDown(mouse) end) end)
I get the first lines but the big space, from down, i dont get it, the three lines... |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 07 Jul 2012 05:11 PM |
I get everything but this line:
if(k == "l") then
Why is there a k there!? what does it do... |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 07 Jul 2012 05:12 PM |
| Forget the post i posted after urs..., but DONT FORGET THE POST TWO AFTER URS... |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 05:13 PM |
| Oops, I copy pasted :P it should be key |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 07 Jul 2012 05:14 PM |
| So the k, is supposed to be key? |
|
|
| Report Abuse |
|
|