script error

Hello, all.
I’m new on scripting and i have a problem with a destroy script.
It’s quite easy (i gues) but it gives this error message: Can’t add script. Script Destroyer had not finished compilation yet.
Please wait until compilation of the script has finished and try again.

this is the script;

function Update () {

Destroy(gameObject.Find(“Cube”), 3);

}

Ty for helping me.

i would try using a tag instead. give the object you want to destroy a tag then have it do something like this.

Destroy(gameObject.FindGameObjectWithTag("TagName"));

For more info see this page. just my 2 cents for objects I use more than once.

Also if its telling you its still compiling, then thats exactly what its doing. sometimes it takes a while other times its instant.