var script : GameObject

Hi guys, upgrading to unity 5 from 4 broke my game in many places. One of these places is here:

	var script : GameObject;
	script = gameObject.GetComponentInChildren(BodyParticleScript);

This throws the error “Cannot convert ‘BodyParticleScript’ to ‘UnityEngine.GameObject’.”

Are scripts not considered GameObjects anymore? Does anyone know how to fix this?

You can use this to access a script var TheScript : ScriptName; and to call it TheScript.AVarFromTheScript;

This seems to have fixed my issue: http://answers.unity3d.com/questions/343602/best-way-to-reference-child-from-parents-script.html