How do i make a main menu in my game

Hello, i’m making a racing game, and i wanna make a main menu that when click on play, makes a sound!

2 Likes

place this local script in the button, get a sound, place it in the script.

script:

script.Parent.MouseButton1Click:Connect(function()
    script.Sound:Play()
end)

this will play the sound after you click the sound.

If you want the button to disappear you can use this.

script.Parent.MouseButton1Click:Connect(function()
    script.Sound:Play()
    script.Parent.Visible = false
end)
3 Likes

You can use this


script.Parent.MouseButton1Click:Connect(function()
	local Sound = Instance.new("Sound")
	Sound.Parent = script.Parent
	Sound.SoundId = "rbxassetid://9113876297" -- clicking sound
	Sound.Volume = 0.5
	Sound.Name = "Click"
    script:WaitForChild("Click"):Play()
end)


3 Likes

but i havent made the menu
Thank you!
-MasterAtTheWings

2 Likes