Can't get bullet to work

Here’s my player and bullet script.

var speed : float; 
var timer : float; 
 
function Start() 
{ 
   timer = Time.timeSinceLevelLoad + 5.0f;
   
   } 
 
function Update () 
{ 
   transform.position += speed * Time.deltaTime * (transform.rotation * 
Vector3.up); 

   if(timer < Time.timeSinceLevelLoad) 
      Destroy(gameObject); 
	  
	   
}
var speed = 3.0;
var rotateSpeed = 3.0;
var bullet : GameObject;

function Update ()
{
      var controller : CharacterController = GetComponent(CharacterController);

      // Rotate around y - axis
      transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);

      // Move forward / backward
      var forward = transform.TransformDirection(Vector3.forward);
      var curSpeed = speed * Input.GetAxis ("Vertical");
      controller.SimpleMove(forward * curSpeed);
}

@script RequireComponent(CharacterController)

 if(Input.GetKeyDown("space")) 
   { 
      var the_bullet = Instantiate(bullet); 
      the_bullet.transform.position = transform.position; 
      the_bullet.transform.rotation = transform.rotation; 
   }

Bulletprefab

Playerprefab

The player moves but if I press “space” nothing happens, no bullet spawns. There’s no errors so I have no idea what’s wrong. Please help me.

Thanks in advance,
Redoxe

The if block that creates the shoot must be inside the Update block

Thanks, it’s working now but the bullet is going up. It probably has something to do with this:

transform.rotation * 
Vector3.up

What should I replace “up” with to make it shoot forward?

 transform.position += speed * Time.deltaTime*transform.forward;

Off the top of my head.