Headbob script ruins character, help?

My headbob script I got from wiki unity community ruins my character. When I press play his arms are stretched WAY out in front of him, they are child objects of the main camera. I need them to be child objects because it is a FPS. How can I make it only effect the camera though? Here is code:

private var timer = 0.0; 
 var bobbingSpeed = 0.18; 
 var bobbingAmount = 0.2; 
 var midpoint = 2.0; 
 
 function Update () { 
    waveslice = 0.0; 
    horizontal = Input.GetAxis("Horizontal"); 
    vertical = Input.GetAxis("Vertical"); 
    if (Mathf.Abs(horizontal) == 0 && Mathf.Abs(vertical) == 0) { 
       timer = 0.0; 
    } 
    else { 
       waveslice = Mathf.Sin(timer); 
       timer += bobbingSpeed * Time.deltaTime;
       if (timer > Mathf.PI * 2) { 
          timer = timer - (Mathf.PI * 2); 
       } 
    } 
    if (waveslice != 0) { 
       translateChange = waveslice * bobbingAmount; 
       totalAxes = Mathf.Abs(horizontal) + Mathf.Abs(vertical); 
       totalAxes = Mathf.Clamp (totalAxes, 0.0, 1.0); 
       translateChange = totalAxes * translateChange; 
       transform.localPosition.y = midpoint + translateChange; 
    } 
    else { 
       transform.localPosition.y = midpoint; 
    } 
 }

One option would be to have your mouselook scripts attached to an object that is a parent to both the camera and arms like this:

 - Parent
   - Camera
   - List item

Then you can attach the camera bob script to the camera and it won’t effect the arms at all.