Invalid access to null node although it starts in the scene

Godot Version

4

Question

I am trying to use line 2d to create what seems to be puppet strings between two objects. I was having trouble positioning it right (Which i will need help with if I fix this) But in trying to things, it started to tell me that the object I was getting the position from is not in the scene. I am using on ready and the ready function so im at a loss. The arrows in the image show the two bodies I am trying to get the position from.


Are you sure string_holder and puppet_character have been set to have unique names? If not, then that will cause the issue.

Yes, they both are. While I did figure it out, I was curious as to why it worked the way it did. I was able to just add the object the code was attached to, to the game scene instead of importing the original scene. And then it worked? Would you know why?

I have no idea.