Change Position Of Object On Button Press?

How would I go about changing the position of my gun when I hold down the right mouse button?

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnMouseDown.html

http://unity3d.com/support/documentation/ScriptReference/Transform.Translate.html

Something like:

function OnMouseDown()
{
    transform.Translate (1,2,1);
}

if that script is attached to an object, and that object has a Collider of any sort on it, when you click on it, it will move.