Mzh3000
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 4967 |
|
|
| 21 Dec 2011 12:42 PM |
I have it so when you press a key, it runs a certian thing once.
What line of code is there to check if they key is still being pressed. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 21 Dec 2011 12:55 PM |
if key == "e" then print("Muhahahhah I pressed it") end
There :D |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 12:56 PM |
| I was wondering that too, thanks! |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 21 Dec 2011 12:56 PM |
if key == "e" then print("Muhahahhah I pressed it") end ---if you want another line, you put elseif elseif key == "p" then print("Muhahahhah I pressed it") end |
|
|
| Report Abuse |
|
|
Mzh3000
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 4967 |
|
|
| 21 Dec 2011 01:00 PM |
Well I already understand that. D:
I am tryig to get it to check if the key is still down, and if it isnt then just end. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
Mzh3000
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 4967 |
|
|
| 21 Dec 2011 01:07 PM |
Gawt it
mouse.KeyUp:connect(function(key) if key=="f" then herpderp=false end end) |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 21 Dec 2011 01:13 PM |
I bet 'herpderp' is 'true' right?
add this
herpderp = true |
|
|
| Report Abuse |
|
|
Mzh3000
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 4967 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 21 Dec 2011 01:20 PM |
| I knew it! By the way, good luck learning about Lua :D |
|
|
| Report Abuse |
|
|