Can somebody figure out what's the wrong with this code?

In this code I would like to swap two objects position when I press "F"but when I do that objects will disappear
Can somebody figure out what’s the wrong with this code?

   var FirstCh1 : Transform;
 var FirstCh2 : Transform;
 var STP : Vector3 ;


function Start () {

}

function Update () {

if (Input.GetKeyDown(KeyCode.F)) {

FirstCh2.transform.position=STP;
FirstCh1.transform.position = FirstCh2.transform.position;
FirstCh2.transform.position=STP ;

}
}

Im just guessing here, I think 1st object and 2nd object just transform them self to the vector that you set. Which is for me if I tried to code (0, 0, 0).

from my understanding is you want to swap place with the two object right, 1st object to 2nd position and 2nd position to 1st position.
This would do the trick:

       var FirstCh1 : Transform;
     var FirstCh2 : Transform;
     var STP : Vector3 ;
     
     
    function Start () {
     
    }
     
    function Update () {
     
    if (Input.GetKeyDown(KeyCode.F)) {
     
  	STP = FirstCh1.transform.position;
    FirstCh1.transform.position =  FirstCh2.transform.position;
    FirstCh2.transform.position=STP ;
     
    }
    }

Try with

// ...
STP = FirstCh1.transform.position;
FirstCh1.transform.position = FirstCh2.transform.position;
FirstCh2.transform.position = STP ;
// ...

Thanks guys, it’s solved now. Thanks a lot