Making a Model move with the Mouse

Ive started using Unity recently and its been a blast, but now I encountered a small problem and was wondering if one of you could help me. Ive been working on a first person multiplayer game and been using a piece of script to tie (make child of) the main Camera to an object floating above the character controller instead of the normal first person one so that the game only requires one main camera in total. This object has mouse look attached to it. Its been working great, but now I tried to add a model in front of my character as a gun and attached it to the camera object, but I got some weird results:

When looking Up:

http://s14.directupload.net/file/d/3225/vg6b9v9m_png.htm

When looking straight (how I want the model to look at all times):

http://s7.directupload.net/file/d/3225/f5ff5rbp_png.htm

When looking down:

hhttp://s7.directupload.net/file/d/3225/v8wedjij_png.htm

As you can see, the model looks like its falling apart. In addition, as you might have noticed when the player looks up the model goes further away while it goes into the player when I look down. I cant fix the weapon falling apart with the “Combine Children” skript, but I think that I need the model to move along with the mouse so that it works properly. Does anyone have any tips on what I can do, or know how to script such a command?

Just raycast the mouseposition to a plane (with a collider of course) and use that hit position (after screen out other objects and making sure the plane is hit) and then use translate to move the object. To find the direction to translate, take (targetPosition - objectPosition) and feed this to the translate function.

Transform.translate()

Hope I am clear enough to steer you in the right direction.