The sprite.update() must run before scene:update() so that manual UI draws (buttons, text, menus) render on top of sprites.