My bullets arent going the right direction

I have a code here to make a bullet shoot but for some reason as a turn the bullet shoots in the direction i came from, here is the code

var bullet : Rigidbody; //Your bullet prefab. Should have a RigidBody
var speed : float = 10.0f;
var muzzlePoint : Transform; //Your SpawnPoint
var GunShot : AudioClip;

function Update() {
if(Input.GetButtonDown(“Fire1”)) {
var instance : Rigidbody = Instantiate(bullet, muzzlePoint.position,
muzzlePoint.rotation);
instance.velocity = muzzlePoint.forward * speed;
audio. PlayOneShot (GunShot);
}
}

please help

You have a rigidbody there you should use the rigidbody function like AddForce:

var bullet : Rigidbody;  
var speed : float = 10.0f; 
var muzzlePoint : Transform; 
var GunShot : AudioClip;
var shoot:boolean =false;

function Update() { 
    if(Input.GetButtonDown("Fire1")){ 
       shoot =true;
       audio.PlayOneShot(Gunshot,0.7f);
    }

}
function FixedUpdate(){
   if(shoot){
       var instance : Rigidbody = Instantiate(bullet, muzzlePoint.position, muzzlePoint.rotation);
       instance.rigidbody.AddForce(transform.forward*speed);
       shoot =false;

   }   
}

You might want to give more speed as well