Discord
Login
Community
DARK THEME

How do I fix this?

init = function() player = object end player.x = 0 player.y = 0 player.speed = 2 //pixels per frame end

update = function() //player movement if keyboard.RIGHT then player.x += player.speed end if keyboard.LEFT then player.x -= player.speed end end

draw = function() screen.clear //sets up screen screen.drawSprite("brick", player.x, player.y, 40,40) end The code shown makes my sprite look like a worm or duplicates of the same things can anyone help me to fix this?

  • P1X3L Ps: Any help is taken!

maybe you forgot () in screen.clear() function ?

Thanks! That was it. Thank you!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community