Why am I getting "Invalid access to property or key 'interact_object' on a base object of type 'null instance'."

Godot 4.3

I am coding in Godot, my first week of game dev, and I am attempting to make objects that can be picked up but first I want them to be outlined when hit by raycast3d. I am running into this error;

"Invalid access to property or key 'interact_object' on a base object of type 'null instance'."

Here is a screenshot of my code below, hopefully someone knows what’s happening. Clearly, something hasn’t been defined right? I have tried a few things but I am so new that I am honestly not surprised they didn’t work. Currently, I do not have the faintest clue what to even attempt. I know that like a thousand people will read this and laugh at how new I am but anything to learn will help.

null usually means something was either not defined, or the way you tried to get that specific instance failed.
In cases like this, I always recommend going step by them and try to work out at what point your script failed.

Since I assume this exception happens in your _ready() function, try to first simply call get_tree then iterate through the items you get. See what it actually returns, and see if what you’re looking for is actually in there or not.
If it is, when go to the next step, call get_tree().get_first_node_in_group("player") and see what that returns.

The function you are using get_first_node_in_group() is used to specifically find a member node of group.
You don’t have any groups showing in the tree.
Just use get_tree().root.get_node() and select the path to the player node.