Fps Gun Scrpt :)

I’m making a FPS i attached a game object to the main camera of a first person controller the game object is to serve as a spawn point to the gun but when i move the camera up and down in the game the spawn point doesnt move i attatched it using parenting here’s my script please help thanks

#pragma strict
 
var bullitPrefab:Transform;
var perShotDelay = 0.15;
 
private var timestamp = 0.0;
private var spawn : Transform;
 
function Start() {
spawn = GameObject.Find("spawn").transform;
}
 
function Update() {
if(Input.GetMouseButton(0) && Time.time > timestamp) {
timestamp = Time.time + perShotDelay;
var bullit = Instantiate(bullitPrefab, spawn.position,Quaternion.identity);
bullit.rigidbody.AddForce(transform.forward * 50000);
}
}

#pragma strict

 var bullitPrefab:Transform;
 var perShotDelay = 0.15;
 var spawn :GameObject;
 
 private var timestamp = 0.0;

  
 function Start() {
 }
  
 function Update() {
 if(Input.GetMouseButton(0) && Time.time > timestamp) {
 timestamp = Time.time + perShotDelay;
 var bullit = Instantiate(bullitPrefab, spawn.transform.position, spawn.transform.rotation);
 bullit.rigidbody.AddForce(transform.forward * 1000);
 }
 }

Set your muzzle/the place bullet come out to spawn… C: