Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make it to where when a player clicks play in the main menu the music stops?

So I have an intro for my game that has intro music. I am trying to find out how to make it to where when the player clicks play In the main menu the music stops.

1 comment

0

use :Stop() allong with a click detector to stop the sound object that is playing

1 answer

To make something happen when you click a button, use the

GuiButton.MouseButton1Click:Connect()

event.

To make the music stop playing, do this:

--In a LocalScript or else it won't work
GuiButton.MouseButton1Click:Connect(function()
	Music:Stop()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.