top down movement issues
I am trying to make it so when you use the arrow keys you move and I've done it only moves once per press so if I gold it it moves once and stops
heres my code
playerY = 0
playerX = 0
end
update = function()
movement()
end
movement = function()
if keyboard.press.LEFT then
playerX -= 50
elsif keyboard.press.RIGHT then
playerX += 50
elsif keyboard.press.UP then
playerY += 50
elsif keyboard.press.DOWN then
playerY -= 50
end
end
draw = function()
screen.clear("blue")
screen.drawSprite("player", playerX, playerY, 20)
end