Rigidbody.AddForce not working

First of all: upon searching I found a lot of similar questions but none seemed to apply. The object (cannonball I'll call it cb) is a rigidbody, non-kinematic and is spawn outside of the cannon at an empty object to specify location.

I'm relatively new to scripting and didn't want to bother anyone but I spend several hours the past two days trying to fix and I can't =\

What happens is that the cannon rotates along it's base to follow the player around and always aim at him. Once every second it will instantiate a prefab named Cannonball. I try to apply a force/velocity to this cannonball along the forward/z axis (I've checked, the cb is instantiated with all axis as I'd want them, y upwards and z pointing at player ignoring height.) The applied force nor the velocity (I tried both) seems to work though, the cb just spawns and slowly by gravity falls to the ground and rolls off the hill. I tried huge values for AddForce as well, won't work.

Script is:

if(shouldIShoot)
    {   
        var cb = Instantiate(bulletPrefab, transform.Find("CannonSpawn").transform.position, Quaternion.identity);

        cb.Rigidbody.AddForce(transform.forward * 3000000);

        shouldIShoot = false;}

Help would be greatly appreciated, preferably in the form of a concrete example of how it should look like, because I'm still new to js :)

Try this:

cb.rigidbody.AddForce(transform.forward * 30);

Rigidbody is the class, rigidbody is the instance of it, and that's what you want to change.