Switch Levels After Getting A Score?

I have a simple script that you attach to a trigger and when you run into it you switch levels and I also have coins in my game that make it so you get points. What I want to do is make it so the trigger (cube) only appears after you have at least say 20 coins. I know this is a simple question but I can’t figure it out.
Thank You!

attach this script to your coin and tick its Trigger checkbox in the Collider settings

var points : 0;

var TargetPoints : int;

function OnTriggerEnter(col : Collider){

 if(col.gameObject.tag == "Player")

 {

      points++;

 }

}

function Update(){

 if(points = TargetPoints)

 {

      GameObject.FindWithTag("FinishPoint").collider = true;

 }

 else

 {

      GameObject.FindWithTag("FinishPoint").collider = false;

 }

}

The trigger that loads level must have a tag “FinishPoint”

Hey there youngster!
You could could use a script that holds global variables for you.

Create a new script and name it "GameTracker" (or something)

create a STATIC variable in this script

static var coins : int; // Thats all you need in this script

now in that script you got on your coins. Somewhere in that script before it gets destroyed, call these lines:

GameTracker.coins++;
if(GameTracker.coins == 20){
    // Enable Trigger
}