Bullet fired at the beginning of the animation messes with the desired direction

My main character has a script called CharacterControllerLogic, in there I have a simple code that makes the character enter a shooting animation.

 if(Input.GetButton ("Jump")){

Then I have a bullet Spawnpoint, also with a script thats makes it spawna bullet when the same key is pressed.

      if (Input.GetButtonDown ("Jump")) {
void fire(){
	int delay = 1;
	GameObject bullet = (GameObject)Instantiate (Resources.Load("bullet"));

	bullet.transform.position = this.transform.position;
	bullet.transform.rotation = this.transform.rotation;
	bullet.AddComponent <Rigidbody> ();

	bullet.rigidbody.AddRelativeForce (Vector3.forward * bulletSpeed);


Whats happening is that the bullet shoots “forward” at the time the character is either idle or running, so the bullets gets fired in directions I don’t want it to, i want to wait for the character to get in Shooting position to fire the bullet really forward. Any tips?

Have you tried setting an event in the animation clip? You can set a keyframe with an event and make that event call the fire() function.