I am making a platformer where two players with opposite gravity go through a number of scenes from by teleporting from the end of the scene to the beginning of the next one. So far the code for this seems straightforward. I have a portal sprite that when overlapping with one of the two players moves the camera sprite to the next scene and teleports both players as well. However, my code makes it so that only the player that goes through the portal gets teleported. I have no idea why this is.
Layout - the scenes are lined up horizontally
First scene. Both players on opposite sides of a line.
Second scene. Top player went through their portal and got repositioned to the next scene. Bottom player left behind.
My code.