Problem with transform

Hello! I want to do it so that the plane after the collision with the water, change the position of the KKK to the wheels. But while compiling i got error BCE0019: ‘transform’ is not a member of ‘system.type’.

My code:

var wodpart = GameObject; 
var wodpart1 = GameObject;

var kolo1 = Transform; 
var kolo2 = Transform;

var miejsce = Transform;

function OnTriggerEnter (other : Collider) {
    if (other.gameObject.CompareTag ("Water")) {
		wodpart1.transform.position = kolo1.transform.position;
		wodpart.transform.position = kolo2.transform.position; 
	}
}

function OnTriggerExit (other : Collider) {
    if (other.gameObject.CompareTag ("Water")) {
		wodpart1.transform.position = miejsce.transform.position;
		wodpart.transform.position = miejsce.transform.position; 
	} 
}

Please help.

The reason you are getting that error is that you are using Transform (with a capital T) which is a type not “transform” which is the current GameObjects transform. You are doing the same with GameObject.

However, did you really mean to have those “=”? Looks to me like they should be “:”

That’s not how you assign types to variables; instead it should be

var wodpart : GameObject;

and same for the others.