How can i let a sign appear when collected a certain amount of orbs ?

Script on the orbs

    public int OrbAmmount;
public GameObject EnergyPickedUpFX;

void Start ()
{

}
void Update ()
{

}

void OnTriggerEnter2D(Collider2D Other)
{
	if (Other.tag == "Player")
	{
		PlayerOrb TheOrb = Other.gameObject.GetComponent<PlayerOrb> ();
		TheOrb.AddOrb (OrbAmmount);
		Destroy (gameObject);
		Instantiate (EnergyPickedUpFX, transform.position, transform.rotation);
	}
}

}

Script for the sign

    bool Activated = false;
public Transform WhereToSpawn;
public GameObject Sign;

private Orbs _Orbs;
public int AmmountToExit;

void Start ()
{
	
}
void Update ()
{
	
}

void CollectedAllOrbs()
{
	if (_Orbs.OrbAmmount >= AmmountToExit)
	{
		Activated = true;
		Instantiate (Sign, WhereToSpawn.position, Quaternion.identity);
		Destroy (gameObject);
	}
}

}

Hi,
Shouldn’t you be comparing
if (CurrentOrbs >= AmmountToExit)

rather than
if (_Orbs.OrbAmmount >= AmmountToExit)

Personally I would move the sign instantiate to the playerOrb script
And when you do AddOrb - put the if (CurrentOrbs >= AmmountToExit) there and if valid instantiate the sign

Thank you verry my much!!!
Now it works perfectly :smiley: