Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 02 Feb 2013 05:25 AM |
Because anonymous functions look cleaner. How would I do that? What's the outline of the code? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 02 Feb 2013 05:27 AM |
Like this, with the script in the HopperBin:
script.Parent.Selected:connect(function(mouse) mouse.KeyDown:connect(function(key) end) end) |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 02 Feb 2013 05:32 AM |
use the key variable for checking the key, and if you want to use a (KEY+MOUSE) combo, use something like this:
if key:lower() == "k" then mouse.Button1Down:connect(function() end) end
|
|
|
| Report Abuse |
|
|