Hi so I am making my first game with godot to just get a feel for things after watching a couple tutorials on yt on how to work the engine. I was just trying to make a flappy bird clone and coding the score. The idea is to have the a gamemanager node that gets called every time the player passes through a pillar. The problem is however that when I pass through a pillar the second time my game throws an error and says that node not found.
And this is my main scene tree and the code for the pillars (buildings)
On line 22 you are destroying the Node2D node if line 21 is true. It’s looking for the GameManager in relation to that Node2D node and can’t find it because you destroyed the node it’s searching from.
so what im understanding is when I duplicate the node, the script still gets the reference to the GameManager in relation to the origional? So then how do I ensure that the script is getting the refrence relative to the current, duplicated node?