Hello,
I got small Jump scare script that I would like to add sound to it and destroy it after one trigger. I added the variable but i just can't figure out how to get it to work. I would appreciate any help given. :)
Below is the javascript.
#pragma strict
var Triger_Object : GameObject;
var Triger_Sound : AudioClip;
function Start () {
Triger_Object.SetActive(false);
}
function OnTriggerEnter () { Triger_Object.SetActive (true); }
function OnTriggerExit () { Triger_Object.SetActive(false); }
↧