Error code CS0029.

I get the compiling error CS0029 about converting Transform to GameObject.

This is the relevant part of my script:

	Handle = this.gameObject.transform.GetChild(0);
	HandleExtra = this.gameObject.transform.GetChild(1);
	BladeHolder = this.gameObject.transform.GetChild(2);
	Blade = this.gameObject.transform.GetChild(3);

Any help is appreciated.

Judging by the error the varibles Handle, HandleExtra, BladeHolder and Blade all are GameObjects

.GetChild refers to the Transform of that object not the GameObject as seen here in this documentation

if you want to assign Handle and everything else to its respected GameObject it will look like this for each

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

Hope this helps :slight_smile: