Clone component referencing

line3 of the following gives the warning ‘Object reference not set to an instance of an object’

clone = Instantiate(prefab);
var script : ScriptType = clone.GetComponent(ScriptType);
script.enabled = false;

any attempt i’ve made to get at this script fails often with this sort of error
‘there is no component (name) attached to the clone object’

is there a special way of addressing components of clones?

BTW the script is attached to the object’s mesh renderer

Check if GetComponent actually returns the component. It will return null if it cannot find it and your script will fail the first time you want to do something with the script.

if (!script) {
    Debug.Log("Script not found!");
    return;
}

The question is why the script cannot be found. It’s obviously not on the prefab you try instantiate or it got deleted at some point. Check that you actually instantiate the right object, that the script is on the object (and not on a child) and that the script is on the clone.