So I have this code:
var Deaths : AudioClip[];
function Update(){
----------
AudioSource.PlayClipAtPoint(Deaths[ Random.Range(0, Deaths.Length)]);
I found this code (AudioSource…) in a tutorial using C# so I guess it wont work cuz of that since it gives me an error! Plz could someone help my get this to work?
Assets/Scripts/Player.js(72,36): BCE0023: No appropriate version of ‘UnityEngine.AudioSource.PlayClipAtPoint’ for the argument list ‘(UnityEngine.AudioClip)’ was found.