how to connect a scene that has been instanced (Godot 3.3.3 or 3.5.1 Please)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Richard_A_Odell

my Level has a script file
const QBOX = preload(“res://Scene/QB.tscn”)
const QBOX1 = preload(“res://Scene/QB1.tscn”)
const QBOX2 = preload(“res://Scene/QB2.tscn”)

func _ready():
if Global.qb:
var q = QBOX.instance()
add_child(q)
q.position.x = 640
q.position.y = -136

On"QB I have a signal called “random_coins()”

on my level scene i have a node call HUD which has a script with the function

func _on_random_coins() → void:
randomize()
var rv = randi()%50+1
Global.coins = Global.coins + rv
_ready()
so i need help
in my level code i need to connect QB to the HUD function above

:bust_in_silhouette: Reply From: zhyrin

q.connect("random_coins", <variable to hud>, "_on_random_coins")