void OnCollisionEnter(Collision test) { if (test.gameObject.tag.Equals("Player")) { ThirdPersonUserControl c = test.gameObject.GetComponent <ThirdPersonUserControl> (); c.updateCurrentSpeed(0); Destroy(gameObject); } }