instead of getting the display object and setting its alpha to 0, add the parameter "opacity" to Rectangle (already implemented in Sprite.lua) so it is given in the constructor (opacity = 0).