Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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.

0
use :Stop() allong with a click detector to stop the sound object that is playing starmaq 1290 — 5y

1 answer

Log in to vote
0
Answered by
srimmbow 241 Moderation Voter
5 years ago

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)
Ad

Answer this question