Hi
So I made this 2D platform fighter with a wizard character who can clone himself. When he does that, he clones his same scene again, the same character with the same script. In order to avoid infinite self referencing, I hid the load part in an if-statement. As mentioned, this works perfectly in the editor, 0 errors, in the exported project however, the character is null and just not there at all.
Does anyone have an idea why? I can show you some code (I'm a beginner and not experienced in programming, just to apologize for weird coding methods in advance)
First the Match Script, second the character script, third the exported project
This happens only in the exported project, and it's not only the text that is null there, I tested it.
if player1 == null: player2.modulate = Color(1,0,0)
I don't ask quickly and instead always try to solve it myself first, but after many hours of googling, trying and failing I'm just really desperate. Any ideas? (Godot 3.5) (I have 4 characters in the game and this only happens to him, that's why I'm suspecting it has something to do with him referencing his own script, Godot doesn't seem to mind though?)