Here's my shooting script.
var Bullet : Transform;
function Update ()
{
if(Input.GetButtonDown("Fire1"))
{
Instantiate(Bullet,transform.position,Quaternion.identity);
Bullet.rigidbody.AddForce(transform.forward * 1000);
}
}
OK, so, it is a rigidbody, there are no error messages about the script itself, but it is send me a message like this: UnassignedReferenceException: The variable Bullet of 'NewBehaviourScript 1' has not been assigned. You probably need to assign the Bullet variable of the NewBehaviourScript 1 script in the inspector.
How do I assign the variable? Thanks.