Why wont the force apply when calling this function? I get no errors, it just instantiates and thats it.
void Update()
{
//While true, button can be pushed
if(bombsEach)
{
if(Input.GetKeyDown("x"))
{
//instantiate and roll bomb
StartCoroutine(RollBombs());
}
}
}
public IEnumerator RollBombs()
{
bombsOut++;
bombsEach = false;
if(bombsOut <= 3)
{
rollIsPlaying = true;
yield return new WaitForSeconds(player.animation["roll_bomb"].length / 3);
rollIsPlaying = false;
Instantiate(bomb, player.transform.position + player.transform.forward * .5f, player.transform.rotation);
bomb.rigidbody.AddForce(bomb.transform.forward * 10, ForceMode.Impulse);
}
}