I am trying to get it so that if the block gets hit by the raycast (Executed earlier in the script), It explodes, exploding other blocks too. Sure enough, it goes sailing, but nothing else does. What’s wrong?
if (hit.collider.tag =="Boom"){
var explosionpos = new Vector3(0,0,0);
explosionpos = hit.rigidbody.transform.position;
explosionpos[2] = explosionpos[2] + 5;
hit.collider.gameObject.GetComponent.<Rigidbody>().AddExplosionForce(1000,explosionpos,20050,3.0F);
Destroy(hit.collider.gameObject, 2);
}