Client
Check if an input has just been pressed once.
input.key_just_pressed(keyname --[[ string ]])
input.key_just_pressed(keycode --[[ integer ]])
Using a keyname:
if input.key_just_pressed("F2") then print("F2 has just been pressed!") end
Using a keycode:
if input.key_just_pressed(60) then print("F2 has just been pressed!") end
Key codes/names list available here.
Last updated 3 months ago