Hi,
I keep getting this error: E 0:00:01.353 get_node: (Node not found: "Head/Camera/RayCast" (relative to "/root").)
<C++ Error> Method failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1466 @ get_node()
<Stack Trace> weapon.gd:7 @ _ready()

Here is my code and node hierarchy:

I have searched many forums and found solutions for similar issues (on GitHub, StackOverflow, etc), yet nothing seems to be working. Am I missing something here?

That error message implies that script is attached to a node whose parent is /root, not Player. But that seems to contradict the screenshot.

Try adding this to that script, and post the output:

func _ready() -> void:
    get_parent().print_tree()

    DaveTheCoder Here's what I get:
    Weapon
    World
    World/Player
    World/Player/CollisionShape
    World/Player/Head
    World/Player/Head/Camera
    World/Player/Head/Camera/RayCast
    World/Player/Head/Camera/RayCast/hand
    World/Player/Head/Camera/RayCast/hand/blaster
    World/Player/Head/Camera/RayCast/hand/blaster/AnimationPlayer
    World/Player/weapon
    World/Player/Timer
    World/Player/TextureRect
    World/Enemy
    World/Enemy/MeshInstance
    World/Enemy/MeshInstance/MeshInstance2
    World/Enemy/MeshInstance/MeshInstance7
    World/Enemy/MeshInstance/MeshInstance4
    World/Enemy/MeshInstance/MeshInstance4/MeshInstance
    World/Enemy/MeshInstance/MeshInstance5
    World/Enemy/MeshInstance/MeshInstance5/MeshInstance
    World/Enemy/MeshInstance/MeshInstance6
    World/Enemy/MeshInstance/MeshInstance6/MeshInstance
    World/Enemy/MeshInstance/gun
    World/Enemy/CollisionShape
    World/Enemy/Timer
    World/Enemy/AnimationPlayer
    World/Enemy/RayCast
    World/DirectionalLight
    World/Label
    World/Label3
    World/CSGCombiner
    World/CSGCombiner/CSGBox
    World/CSGCombiner/CSGBox/CSGBox2
    World/CSGCombiner/CSGBox2
    World/CSGCombiner/CSGBox2/CSGBox2
    World/CSGCombiner/CSGBox3
    World/CSGCombiner/CSGBox3/CSGBox2
    World/CSGCombiner/CSGBox4
    World/CSGCombiner/CSGBox4/CSGBox2
    World/CSGCombiner/CSGBox6
    World/ProgressBar
    World/CSGBox
    World/CSGBox3
    World/CSGBox2
    World/CSGBox4
    .
    CollisionShape
    Head
    Head/Camera
    Head/Camera/RayCast
    Head/Camera/RayCast/hand
    Head/Camera/RayCast/hand/blaster
    Head/Camera/RayCast/hand/blaster/AnimationPlayer
    weapon
    Timer
    TextureRect

    It looks like that script is attached to a node other than "weapon". Is it also attached to Weapon, the node that's printed first? That would explain the error message, since Weapon's parent is apparently /root.

      DaveTheCoder Ah, I think I might understand what's wrong. I believe it has something to do with how the root of the scene changes when I bring my Player into the Main scene, and so its children also change. The other "Weapon" is just a global autoload of my weapon script. Thanks for the help, I'll post here if I get it working!

      I got it... my raycast wasn't enabled lol... wow