can someone help me with this code
when I stop moving the sprite just disappears
init = function() end
update = function()
local speed = keyboard.SHIFT and 3 or 1
if keyboard.LEFT then x = x - speed end
if keyboard.RIGHT then x = x + speed end
end
draw = function() screen.drawMap("map", 0, 0, 451, 200) if keyboard.LEFT then screen.drawSprite("sprite3", x, -70, 30) end if keyboard.RIGHT then screen.drawSprite("sprite4", x, -70, 30) end end
can someone please help me because I don't know what to do.

