Onready Example

extends Node
# onready ensures that all child nodes are created
@onready var weapon = $Player/Weapon
 
func _ready():
	print(weapon.get_path())

Direct Reference Example

func _ready():
	$Label.text = "Hello World"