|
| 04 Feb 2012 06:16 PM |
| Mind simplyifing the "KeyDown" function and how I can use it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Feb 2012 06:23 PM |
Use it in hopperbins, fired when a button is pushed. It is wierdly fired in the mouse.
script.Parent.Selected:connect(function(m) m.KeyDown:connect(function(key) if key:lower() == "h" then ~stoff that happens when the 'h' key is pushed down. end end) end) |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 06:35 PM |
| Thank you now I shall make a weapon. |
|
|
| Report Abuse |
|
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 04 Feb 2012 06:37 PM |
you can also use it in Tools as well,
function onEquipped(mouse) function onKeyDown(key) if key == "f" then print'lol' end end mouse.KeyDown:connect(onKeyDown) script.Parent.Equipped:connect(onEquipped)
that should work for a tool. |
|
|
| Report Abuse |
|
|