Posted 13 July 2013 - 08:30 PM
Is there a way to detect what key is being pressed? Say you have a function that returns a key that is being held down.
Output:
Sorry for the noobish sounding explanation… Not sure how to explain it any other way though.
function getKey()
return (Key that is currently pressed)
end
while true do
print(getKey())
sleep(1)
end
Output:
nil
nil
nil
nil
*presses enter*
28
28
28
28
*releases enter*
nil
nil
nil
Sorry for the noobish sounding explanation… Not sure how to explain it any other way though.