Im having trouble with my Audio playing on a Mouse Click. Tell me what is wrong with my Script?

@script RequireComponent(AudioSource)
var front : AudioClip;
var back : AudioClip;

    function Update(){
     
      if (Input.GetMouseButtonDown(0))
      {
        audio.PlayOneShot(AudioSource.front, 1.0);
      }
      
      if (Input.GetMouseButtonDown(1))
      {
      audio.PlayOneShot(AudioSource.back, 1.0);
      }
    }

NEVERMIND GUYS. I FINALLY FIGURED IT OUT. I just needed to erase the AudioSource from the AudioSource.front and AudioSource.back and it was all good.

Assuming “front” and “back” are assigned in the inspector, you don’t need the “AudioSource.” prefix:

  if (Input.GetMouseButtonDown(0))
  {
    audio.PlayOneShot(front, 1.0);
  }