Autoload breaks the script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mxt08

When I run a scene with a KinematicBody that have an script attached, I get an error that says that a variable that contains a node location (I checked one thousand times that it is correct) is null. The script is in the autoload, but when I remove it from there, the error disappears. Is there a way to see what is interacting with the variable accesing from the autoload?
Thanks in advanced

:bust_in_silhouette: Reply From: Inces

So where is this code scripted ? In Body or Autoload ? Paste the code with introduction of variable and the one with getting the variable from autoload. Surely You made some mistake resulting in variable being referenced too early or reference gone