I know this question has been asked loads of times but I want to know whats the problem with my script. I did what people say you have to do.
using UnityEngine;
using System.Collections;
public class checkifclick2 : MonoBehaviour {
public static int points = 0;
void OnMouseDown () {
Destroy(gameObject);
points = points + 1;
}
void OnGUI() {
string strpoints = points.ToString ();
GUI.Label (Rect (0, 0, 100, 100), strpoints);
}
}
thank you