var componentType : String;
function OnTriggerEnter (hitPlayer : Collider) {
if(hitPlayer.gameObject.tag == "Army Cube" || "Gold Cube" || "Flame Cube" || "Gravity Cube" || "Ice Cube" || "Mini Cube") {
var added : Component = gameObject.AddComponent(componentType);
added.enabled = false;
}
}
How could i make it to were i can make this script wait to add component, i know you would use “yeildforseconds” but i want to be able to change the seconds in the inspector and if it has no time to wait to not wait at all thanks for any help