position is not a member of Object and GetChild()

This code is giving me 2 errors "BCE0019: ‘position’ is not a member of ‘Object’. " at lines where I try to change position. Can anyone tell me what’s wrong? Script is attached to an object whose child i need to reposition depending on the raycast result.

#pragma strict

public var switchButton;
switchButton = this.gameObject.transform.GetChild(0);

function Update () {

I mainly code in C#, so I can’t really say, but I’m going to shoot and say switchButton never gets initialized. This:

 switchButton = this.gameObject.transform.GetChild(0);

should be inside Start() or Awake()