I'm interested in making that for my games. So for example I use an id say for example: 190789505 Would I be able to make it play and when the user clicks play game it will stop the music?
How can I make a song play and when someone clicks "Play Game" it stops?
2 answers
This isn't a request but I'll provide you a link to guide you
To do this you will need to add a script/localscript under the button.
You will use Music:Play(), to play it, and Music:Stop(), to stop it.
By the way, I will do the script for you, but do NOT request us to do a script for you. Please show us your current attempt. If you want to request go on the forums.
You need to use Events to get the click, in this case, MouseButton1Click, since it works better.
Then, you connect it to a function, in wich we will make a new one.
music = script.Parent.Parent.Music -- Make sure the Sound is named Music and is parented above the button
music:Play() -- Make it play
script.Parent.MouseButton1Click:connect(function()
music:Stop() -- Stop it on click
end)
Hope this works it out!
2 comments
That would work, but local sound would work so the music stops for that player, and not for all players
If the music is parented to player gui it is automatically local. Thus why I tell parent it after button
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
This is true. Still, please see my answer.
This wasn't helpful at all