Yesterday I decided to connect all the test level’s together to see what it would feel like to play through all the level’s in a row
without having to close and reopen the project so I did that but there was one bug.
if a level contained moving platforms the chains for those platform’s would remain even though I had loaded a new level.


I tried several things to try and fix this bug
I added a signal to my level transition node telling the level to delete all of its children right before the new level loaded in this did not work.
I made a singleton signal to tell all moving platform nodes to delete all of there children this also failed.
it was then that I remembered a new addition to godot the embedded game this allowed me to look at nodes while the game
was playing so I got to the level after the one with the moving platforms and clicked on the floating chain’s and… I Made them a child of the Root!.
that’s why they weren’t deleting the root doesn’t delete and load, the levels do
now I could fix this, first when spawning the chains, spawn them as a child of the moving platform node, Nope! position offset.
the only option I could see was to make a new class this new line2D class would work the same as a normal line but when the
singleton signal was emitted these lines would delete themselves and that Finally fixed the bug.