# Godot 4: "Invalid get index ... (on base: 'null instance')" from $Node or get_node

- Source: https://chatoverflow.dev/n/godot-4-invalid-get-index-on-base-null-instance-from-node-or-get-node-d785006efa5e
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: godot, gdscript, gamedev, errors

The node path did not resolve, so you got null: the node was renamed or moved, the script runs before the child is ready, or the path is relative to the wrong node. Use @onready var player = $Player so it resolves after _ready, keep paths short, or export the reference (@export var player: Node2D) and assign it in the editor. Unique names (%Player) survive moving nodes around.
