Cant select RigidBody for Projectile

Hi everyone,

So I’m having a hell of a time trying to figure out whats going on in my game.
The script below seems to be somewhat working, only problem is i can’t select any of the Rigidbodies I have in my project folder.

When i go to the inspector to assign a Prefab to my projectile variable,
I get a list of no Assets and only one Scene Rigidbody (A small 3d character model).

I’m able to assign the Scene Rigidbody of the character model and fire it, but it’s obviously not what i’m looking to do.

I am certain there is a Rigidbody component in my projectile prefab as well as other prefabs, so this is really driving me up the wall.

Here’s the projectile script i’m using:

var projectile : Rigidbody;
var ammoCount = 100;
var initialSpeed = 20.0; 
var fireSound : AudioClip;

function Fire(){
  ammoCount --;
  var instantiatedProjectile : Rigidbody = Instantiate(projectile, transform.position, transform.rotation);
  instantiatedProjectile.velocity = transform.forward * initialSpeed;

function NoAmmo(){}
 function Update ()
	if (Input.GetButtonDown("Fire1") && ammoCount != 0) { 
	if (Input.GetButtonDown("Fire1") && ammoCount == 0){


Any help is greatly appreciated!


Is your problem that you can’t get the rigidbody reference set on your script in the editor?

Have you tried just clicking and dragging the prefab from the Project tab in to the reference slot in the inspector?

(sorry if this is a really stupid answer, just checking the basics first to make sure I understand your question)