conect signal, what is missing?

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

i have an instance not in the scene and a label in the scene
and i want to increment the score when it spwans

var pipe =preload(“res://pipe.tscn”).instance
pipe.connect(“pipe”, label,“plusscore”)

and in the label i
func plusscore()

:bust_in_silhouette: Reply From: MintSoda

Your code is broken. Use code sample button for your code.
enter image description here

You wrote pipe.connect("pipe", label,"plusscore")
pipe doesn’t sound like a signal name to me. If pipe is a signal, did you declare/emit it? which attached to pipe.tscn

extends Node
signal pipe

Every time you pipe.emit_signal("pipe"), plus_score() is called.

Also, why don’t you just label.plus_score()?