Help me! I cant aim properly

Hi everyone, i just need ur help. I am making a FPS and I add a weapon and some sparks but when i play the game and I shoot the sparks hit far away from where it should hit.

P.S: im using a tutorial from unity 3d downloaded from unity3d.

It's probably because the gun isn't lined up properly. To fix that just make sure the object with the gun script is a child of the main camera, and then set its position and rotation to (0, 0, 0).

Another thing that I've found helpful is a "draw ray" script, which basically draws a line showing where a gameobject is pointing. Try dragging this script onto your gun and turning on 'gizmos' in the game view; the red line should show exactly where the gun is pointing ( so you can use that to aim it).

var needsSelection : boolean = false;

function OnDrawGizmosSelected () {
    if(needsSelection){
        Gizmos.color = Color.red;
        direction = transform.TransformDirection (Vector3.forward) *50000;
        Gizmos.DrawRay (transform.position, direction);
    }
}

function OnDrawGizmos () {
    if(!needsSelection){
        Gizmos.color = Color.red;
        direction = transform.TransformDirection (Vector3.forward) *50000;
        Gizmos.DrawRay (transform.position, direction);

    }
}

The weapons parent object need to be in the same place as the weapon otherwise it will fire towards the wrong place. Also you may not have a long enough range as thats one of the variables you can set.