Help Fix My Grenade Script

Ok I finally put it in code form.

This script goes on the grenade

var radius : float = 5.0;    //provides a radius at which the explosive will effect rigidbodies
var power : float = 10.0;    //provides explosive power
var explosiveLift : float = 1.0; //determines how the explosion reacts. A higher value means rigidbodies will fly upward
var explosiveDelay : float = 5.0; //adds a delay in seconds to our explosive object
var explosionPrefab : Transform;
var explosionSound : AudioClip;
 
function Update () {
 
Fire();
}
 
function Fire () {
 
  yield WaitForSeconds(explosiveDelay);
  Instantiate(explosionPrefab, transform.position, transform.rotation);
  var grenadeOrigin : Vector3 = transform.position;
  var colliders : Collider[] = Physics.OverlapSphere (grenadeOrigin, radius); //this is saying that if any collider within the radius of our object will feel the explosion
 
for(var hit : Collider in colliders){  //for loop that says if we hit any colliders, then do the following below
   if (hit.GetComponent.<Rigidbody>()){
      hit.GetComponent.<Rigidbody>().AddExplosionForce(power, grenadeOrigin, radius, explosiveLift); //if we hit any rigidbodies then add force based off our power, the position of the explosion object
      AudioSource.PlayClipAtPoint(explosionSound, transform.position, 1);
      Destroy(gameObject);                        //the radius and finally the explosive lift. Afterwards destroy the game object.
                    }
         }
}

This script goes on the character or an empty game object which is the throw script

var grenade : Rigidbody; //our prefab
var throwPower : float = 10; //power variable determines how fast this object will be "shot out"
 
function Start () {
 
}
 
function Update () {
 
if (Input.GetKeyDown(KeyCode.G)) {
    var clone : Rigidbody; //variable within a variable
    clone = Instantiate(grenade, transform.position, transform.rotation);
     clone.velocity = transform.TransformDirection(Vector3.forward * throwPower); //applies force to our prefab using the throwPower variable
 
   }
}

And this script goes in the explosion prefab of the grenade script. I keep getting a spam error saying CanDestroy cannot be defined

using UnityEngine;
using System.Collections;
 
public class PhysicalExplosion : MonoBehaviour 
{
    public float Radius;// explosion radius
    public float Force;// explosion forse
    void Update () 
    {
        Collider[] hitColliders = Physics.OverlapSphere(transform.position, Radius);// create explosion
        for(int i=0; i<hitColliders.Length; i++)
        {              
            if(hitColliders*.CompareTag("CanDestroy"))// if tag CanBeRigidbody*

{
if(!hitColliders*.GetComponent())*
{
hitColliders*.gameObject.AddComponent();*
}
hitColliders*.GetComponent().AddExplosionForce(Force, transform.position, Radius, 0.0F); // push game object*
}

}
Destroy(gameObject,0.2f);// destroy explosion
}
void OnDrawGizmos()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position,Radius);
}
}

My comment in answer form:

Do NOT put the grenade in the scene. Grab the grenade that is in the scene (yes with a rigidbody attached) move it into your assets folder. See that a prefab now exists in the assets. Remove the grenade from the scene.

Click on the object which has ThrowGrenade.js attached. In it’s public field “grenade” drop your grenade prefab from the assets folder.

CanDestroy must be one of the predefined tags in the project. It sounds like it isn’t. Perhaps you are using the wrong tag name, or simply have not defined it yet.

(Add a tag in the Tags & Layers manager in Edit>Project Settings>Tags and Layers or by choosing “Add Tag…” from a GameObject’s tag selector dropdown.)

Jwizard93 Good One man