I am making a dungeon crawler and when the player changes levels, a new scene is loaded and a new instance of the playr is created. All the player's information are stored on global script, when I try to go back to a previous level, I get this error:
Invalid type in function 'add_child' in base 'Node2D (Game.gd)'. The Object-derived class of argument 1 (previously freed instance) is not a subclass of the expected argument class.
Can someone explain?