Godot Version
Godot 4.2.1
Question
My main scene starts with an instance of my player placed via the editor and all the associated scripts work fine. Later, when the player is deleted and instantiated via code, the once functioning scripts are no longer able to access any variables of the player and crash immediately, throwing the same Invalid get index 'variable_name' (on base: 'CharacterBody3D').
error every time. I am having nearly the exact same issue as this reddit post, but I can’t figure out my issue.