How to reference a variabale from another scene

Godot version: 4.7

Question

This is my first project in Godot and I’m having some trouble. I have a training dummy and I want to reduce it’s health bar when I shoot at it. Because I want to implement in the future more weapons, I would prefer to have the bullet damage/ weapon damage var inside the weapon scene. If possible I would also like to detect only the Area2D on the bullet because i have another one as the damage hitbox on the player.

@export var dummy_health: float = 1000.0

func _process(delta: float) -> void:
	$Label.text = "Current health =" + str(dummy_health)

func _on_area_2d_area_entered(area: Area2D) -> void:
	dummy_health -= #Insert function which I don't know yet 

Add a function called damage in the dummy. Use groups to detect hittable objs and set the damage amount from the bullet or weapon itself.

You can find more info on the docs