Play a sound when button is pressed script problems

Hi everyone im a 14 year old guy who just a few months ago started (trying to) developing games. I don’t know much of scripting so please don’t blame me since this “problem” that i got is probably realy easy to solve.
So what i want is that when i press a button that says start game you hear a click and it starts the game. the only thing i need to add is when i press start game the click sound starts.
this is my script (C#)

using System.Collections;

public class Menu: MonoBehaviour {

// Use this for initialization
void OnMouseEnter () {

renderer.material.color =;


void OnMouseExit () {

renderer.material.color = Color.white;

void OnMouseDown () {


Did you go through the sound guide or the AudioSource documentation?

Basically you need to

  1. Make sure you have an AudioListener in your scene
  2. Add an AudioSource to your button and Play() it from code
  3. OR use the AudioSource.PlayOneShot() method instead

void OnMouseDown () {

Application.LoadLevel(“BehindLocks”) {

Do not include AudioSource.Playoneshot it is Audio.PlayoneShot… AudioSource is to do with the camera.