GetComponent BCE00018 error (ultra n00b)

Hi,

I want to acces another script on the same gameobject, using GetComponent… But I keep getting a BCE00018 error The name ‘Ragdolldestroy’ does not denote a valid type…
I’m sure it’s something stupid i’m doing wrong. Help!! :stuck_out_tongue:

function Start () 
{
var script : Ragdollsdestroy;
script = GetComponent("Ragdollsdestroy");
script.Destroy ();
print("Succes!!");
}

Seems you don’t have a script called “Ragdollsdestroy”. Check your project folder for a file called Ragdollsdestroy. Note that the types are case sensitive. If you don’t have it there, it means you don’t have the definition for Ragdollsdestroy. If you don’t have the script, then you can’t use it.