Hello everyone, I am trying to have the player move smoothly in any direction they choose based on which key they pressed. Right now, I want the player to move left when the ‘a’ key is pressed. I have no clue how to do this. I want a smooth movement with no errors or jerkiness.
All I have is this to get me started:
if event.keyName == "a" then if event.phase == "down" then local message = "a was pressed" print(message) elseif event.phase == "up" then local message = "a was released" print(message) end end
Any help is appreciated. When this problem is solved, … I have another. Thank you for your support.