Pretty simple script.
#pragma strict
var rag : GameObject;
var Health : GameObject;
function Start () {
}
function Update () {
if(Health.GetComponent(CentralHealth).Health == 0) {
rag.GetComponent(Ragdoll).Ragdoll == true;
}
}
Pretty simple script.
#pragma strict
var rag : GameObject;
var Health : GameObject;
function Start () {
}
function Update () {
if(Health.GetComponent(CentralHealth).Health == 0) {
rag.GetComponent(Ragdoll).Ragdoll == true;
}
}
== is for comparison, = is for assignment. Line 11 in the code you posted.