Bullet does not move forward

i have written code for firing bullet. but it does not move forward. when my bullet is instantiated, It appears infront of my gun. So what can be the problem? pleaze help me,.

Here is my code:

#pragma strict

var BulletPrefab : GameObject;


function Update () {
	
}

function OnGUI()
{
	if(GUI.Button(Rect(10,10,90,50),"Fire"))
	{		 
		 var bullet : GameObject;
		 bullet = Instantiate(BulletPrefab, gameObject.Find("Spawn").transform.position , gameObject.Find("Spawn").transform.rotation);
   		 //bullet.rigidbody.AddForce(bullet.transform.forward * 5000);
   		 bullet.rigidbody.useGravity = false;
   		 bullet.rigidbody.AddForce(bullet.transform.forward * 5000 , ForceMode.Impulse);
	}
}

please solve my problem. Thanks for your help and support in advance.

Your Code Looks Correct…
only 3 things I can think of Are:
Your Bullet prefab / or GameObject rigidbody is Marked as Kinimatic

you Bullet’s rigidbody is marked to freeze on certain axis

Time.timeScale = 0?
Make sure its = 1 to see if your script is working