|
| 13 May 2014 01:00 PM |
function KeyDown(key) key = key:lower() if key == "x" then print("Key pressed") end end
function Equipped() mouse.KeyDown:connect(function(KeyDown) end) end
Tool.Equipped:connect(Equipped)
Nothing happens when I do this? What's wrong with it? |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 01:02 PM |
| if its a hopperbin try .Selected:connect |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
| |
|
|
| 13 May 2014 02:43 PM |
| I did in the actual script. Also, Tool is also defined. It's more about the line below function Equipped() |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 02:45 PM |
tool.Activated:connect(function()
end)
This will fire when the player presses on the mouse if the tool is equipped. Look it up if you don't believe me. |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 02:45 PM |
| Lol sorry I just read the thread I was looking at the replies. |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 03:23 PM |
| Not a single reply has helped me so far. Bump. |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 03:26 PM |
| The event is called KeyDown and the function is called KeyDown, that's not good. |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 03:28 PM |
You are doing this...
function(ARGUMENT = KeyDown) end)
You should be doing (function(KeyPressed) Keydown(KeyPressed) end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 May 2014 03:38 AM |
| I think I got the same problem here. |
|
|
| Report Abuse |
|
|