Hey guys this script does not work propperly cn you help me?
its attached to a sphere that simulates a force Shield. and my idea was to get the forseshield ony able to see when its been hit by my machine gun script wich is attachted to my space ship
function Awake (){
gameObject.renderer.enabled = false;
}
function Update () {
}
function OnTriggerEnter (hit : Renderer)
{
GameObject.FindGameObjectWithTag("Shield");
hit.gameObject.renderer.enabled = true;
}
↧