I’m trying to play two animations when I hit one button. I try to duplicated the function but shows error.
what i’m doing wrong?
Please any advise is welcome.
var Skin_battery: GUISkin ;
var beep : AudioClip;
var other : GameObject;
function OnGUI (){
//Make the First button
GUI.skin = Skin_battery;
if (GUI.Button(Rect(730,450,100,48),"")){
audio.PlayOneShot(beep);
animation.Play("Battery");
animation.Play("Tool");
}
}
@script RequireComponent(AudioSource)