Background image moves to the top of the game window when I change scene and come back

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By randomguy

I’m using a ParallaxBackground with a few ParallaxLayers using Sprites with repeat flags enabled. When I change a scene and come back, all the ParallaxLayers are moved to the topleft corner of the game window. Why is this happening?

:bust_in_silhouette: Reply From: horsecar123

When your whole sprite size is smaller than your viewport size parallaxBackground doesn’t work properly.
To solve this in the sprites, in the region category, enable it and set the width and height to a multiple of your sprite texture size that is bigger than your screen. If it still glitches follow the guidelines in the link below.