How do I play an AudioClip when I click a certain area?

I’m currently coding the main menu for the game I’m working on. I’ve coded it so that when the mouse is on top of certain text, it will turn red and a sound will be heard. I’m trying to add another sound that will play when I actually click the text. I am a beginner coder so I apologize if the answer is very simple. I have researched this, but I am still having difficulties.

//this plays the sound when the mouse hovers over the text.

function OnMouseEnter() {

//this is the part where I’m having trouble with. I have a sound called click and I made
it an AudioSource to all the text that can be selected.

var AudioSource = “Click”;
function OnMouseDown() {


Hello, I use this script for clicking objects and opening levels for my main menu. This script plays noise when hovering and clicking something and loads levels. Feel free to modify this anyway and I hope this helps.

var levelToLoad : String;
var soundhover : AudioClip;
var beep : AudioClip;
var QuitButton : boolean = false;
function OnMouseEnter(){
function OnMouseUp(){
yield new WaitForSeconds(0.35);
@script RequireComponent(AudioSource)