how can i load a scene when reaching certain score? Roll-a-Ball Project

Hello
So i was watching the project roll a ball, instead of boxes i put coins and changed the game a little
But in these videos it explains how to count score nothing about loading new scenes and stuff
i fugured out by myself (wich is BIG thing) how to load a new scene
i put a cube in the scene and a script like

using UnityEngine;
using System.Collections;

public class LevelLoad : MonoBehaviour {
	void OnTriggerEnter(Collider other) {
		Application.LoadLevel("Scene2");
	}
}

but the score is “counted” or “Stored” in the character script
It looks like this

using UnityEngine;
using System.Collections;

	public class PlayerController : MonoBehaviour {
	public float speed;
	public GUIText countText;
	public GUIText winText;
	private int count;

	void Start ()
	{
		count = 0;
		SetCountText ();
		winText.text = "";
	}

	void FixedUpdate ()
	{
		float moveHorizontal = Input.GetAxis("Horizontal");
		float moveVertical = Input.GetAxis("Vertical");
		
		Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
		
		GetComponent<Rigidbody>().AddForce(movement * speed * Time.deltaTime);
	}

	void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.tag == "PickUp")
		{
			other.gameObject.SetActive(false);
			count = count + 1;
			SetCountText ();
		}
	}

	void SetCountText ()
	{
		countText.text = "Count: " + count.ToString ();
		if (count >= 7)
		{
			winText.text = "You May Now Pass To The Next Level!";
		}
	}
}

How i do to be Unable to pass to the next level unless you have “7” Score ?

and now that we are here
i have another question
How can i make menu’s and stuff?

If anyone know’s a link to documentation or tutorials for this things or any one knows to answer here

Thanx a lot :smiley:

This tutorial will show you adding points / scores

As for loading your next level at a certain score just a simple if statement will do that.

If(score >= 7) //in this case 'score' is just whatever variable name you allocate to your score system.
{
  //Load your level here
}

quick reference to load level

:slight_smile:

You may also use PlayerPrefs to save the score and retrieve it back

Good luck