Cartoony Clouds

Well I have this Cartoony_Clouds that I recovered in my library of free things… I tried to search in the forum but this system didn’t show up.
Now, it’s all working very cool but when I try to compile for Android I get two errors:

Assets/MARCO/Cartoony_Clouds/Scripts/Cloud.js(14,26): BCE0019: ‘parent’ is not a member of ‘UnityEngine.Object’.
Assets/MARCO/Cartoony_Clouds/Scripts/Cloud.js(17,38): BCE0019: ‘gameObject’ is not a member of ‘UnityEngine.Object’.

This is the incriminated script:

var cloud : Transform;
var dist : float;
var amount : int;
var hightRandom : float = 100;
@HideInInspector
@SerializeField
private var clouds : GameObject[];

function New () {
	DeleteClouds();
	clouds = new GameObject[amount];
	for(i=0;i<clouds.length;i++){
		var newCloud = Instantiate(cloud,transform.position+Vector3(Random.Range(-dist,dist),Random.Range(-hightRandom,hightRandom),Random.Range(-dist,dist)),transform.rotation);
		newCloud.parent = transform;
		
		
		clouds[i] = newCloud.gameObject;
	}
	
}

function DeleteClouds () {
	for(i=0;i<clouds.length;i++){
		DestroyImmediate(clouds[i].gameObject);
		
	}
	clouds = new GameObject [0];
}

Compiling for web goes well, only with Android this problem comes out.

Can anybody tell me what’s the problem?

Instantiate returns an object of class UnityEngine.Object

Not unityengine.transform

you must cast it appropriately through adding as Transform at the end of the instantiate line so var newCloud contains a transform not an object

the functionality that UnityEngine.Object offers can be looked up in the script reference