Play sound when button is clicked (HELP PLEASE)

Hey guys

Im kinda new to unity so sorry if this is a simple question. I have looked online on how to do this but i can only find JS versions or older versions to my solution.

I am currently using unity 5.0.1 and i am having problems with getting audio to play when a button is pressed.
I have my button setup like this http://i.gyazo.com/7c3ab8eda29faa0bfca16769574ff4b9.png
so for the onlick i have 2 options, one of them is to change scenes and the other one would be the play audio one, this is where the error is occuring, it only changes scenes but doesnt play sound and i get this error:

MissingComponentException: There is no ‘AudioSource’ attached to the “UI manager” game object, but a script is trying to access it.
You probably need to add a AudioSource to the game object “UI manager”. Or your script needs to check if the component is attached before using it.

my code: http://i.gyazo.com/445bc85016392d253dbcffd591b98fee.png

so just to clarify, im trying to play sound when the button is clicked. any help would be appreciated, thanks!

It seems you have attached sound to your button.attach a script to your button
and then do something like that.

public void PlaySound()
{
audio.play();
}

create an event trigger and bring your button into it and call PlaySound and you are done.

Or, just add and AudioSource to UIManager…

“There is no ‘AudioSource’ attached to the “UI manager” game object, but a script is trying to access it.
You probably need to add a AudioSource to the game object “UI manager””

I think you added and Audio.Play in your buttons OnCLick listener. If you have the UIManager as the “Object” then it is trying to play that objects audio file… there isnt one, so add it.

Just drag the audio file onto UIManager. Done.