Throw ball with Cannon Physics

Hellow,

I'm trying to make a Canon-Type launcher.

So I need to add force to a Ball (Sphere) from Box Collider situated inside the Cannon.

So far what I've been trying, is to Add Force to the Ball relative to the Cannon (Box Collider) angle and direction (based on his X axis).

Edit: Maybe I wasn't clear ennough, the force need to be applid to an already existing ball.

What part is not working exactly?

Here is a simple script that does what you describe:

Cannon.js

var cannonball : Transform;

function Update() {
    if(Input.GetButtonUp("Fire1")) {
        var projectile = Instantiate(cannonball,
                                     transform.position,
                                     transform.rotation);
        projectile.rigidbody.AddForce(transform.right * 10000);//cannon's x axis
        Physics.IgnoreCollision(projectile.collider, collider);
    }
}

The Physics.IgnoreCollisions is there to prevent unwanted collisions between the projectile and the cannon. In stead of Physics.IgnoreCollisions, you could have no collider on the cannon or you could have a mesh collider on the cannon whose shape you know will not inadvertently collide with the projectiles or you could simply instantiate the projectile away from the cannon slightly.