OnCollision Script...

I’ve got this script I’m trying to only happen when an object with a “waypointcube” tag collides with it. The debug I put in the script is not working. Therefore, what is not setup correctly?

function OnCollisionEnter (collision : Collision) {
	if (collision.gameObject.CompareTag ("waypointcube")){
		Debug.Log("hit");
		}
}

Try

collision.gameObject.tag == "waypointcube"`

instead of:

collision.gameObject.CompareTag ("waypointcube")

I actually never used ‘CompareTag’.
When I use

if (gameObject.tag == "mytag")
  badabing();

the comparison works, so I’d suggest you do this first, to be sure that everything’s setup correctly.

Of course you too might want to put the debug at function start, to actually print the Collision tag.

Anyways, regarding tag comparison, since it’s most certainly a bitwise operation (as for layers)

the correct function call should be

function OnCollisionEnter (collision : Collision) {
    if (collision.gameObject.tag == CompareTag()){
       Debug.Log("hit");
       }
}

if I understand its use correctly.