Getting null nodes even though i have the correct path

Godot Version

Godot 4.4 - mono

Question

` I tried following the principle of the Godot tutorial to implement an UI, but i keep getting null instances, even though my paths are correct.
Here is my node tree:

and my hud node tree:

here is the code in hude.gd (attached to the hud canvas layer):

extends CanvasLayer
@onready var dealer_charges_counter: Label = $DealerChargesCounter
@onready var player_charges_counter: Label = $PlayerChargesCounter
@onready var player_label: Label = $PlayerLabel
@onready var dealer_label: Label = $DealerLabel

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	SignalManager.update_lives.connect(update_lives)
# Called every frame. 'delta' is the elapsed time sisnce the previous frame.
func _process(_delta: float) -> void:
	pass

func update_lives():
	print("Player lives: ", Lives.player_lives)
	print("Dealer lives: ", Lives.dealer_lives)
	player_label.hide()
	dealer_label.hide()
	player_charges_counter.text = str(Lives.player_lives)
	dealer_charges_counter.text = str(Lives.dealer_lives)

and here is the error:

Here are my globals:

you have Hud.gd as a global script, which doesnt make sense when you also want to use it as a scene in your game

Your globals are all .gd scripts, these are implemented as a new node on the root of the scene tree without any children, Maybe adding the Hud’s .tscn scene would fix this issue, but I suspect you already have a Hud scene in the game which you may want to remove.

Check the “Remote” tab in the scene tree while the game is running to illuminate how globals interact with the scene.

Thanks, removing the hud.gd script from globals and removing and readding the hud node to my tree fixed it