I am trying to get objects to count as they hit a trigger, I have the below script which I have placed in two objects that I want to count, basically it counts one object but not the other, I want it to continue to count as objects/cubes hit the trigger.
using UnityEngine;
using System.Collections;
public class Score : MonoBehaviour {
public GUIText countText;
public int score;
if I enable Is Trigger the objects drop through the plane which is not what I want. I have enabled Is Trigger on a bottom plane which I want to trigger the score when the objects/cubes hit it.
Looks like you attach this script to your objects, and there is many objects with the same GUIText variable, and for each object variable score will be allways 1, think about it…