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

How to make music that stops when I click the play button?

Asked by 3 years ago

Hello, How to make that music stops whenever a player click the play button?

1 answer

Log in to vote
0
Answered by 3 years ago

Create an TextButton, modify it a little bit then add these code:

if you dont have any sound on workspace or anything here:

local id = 'place the sound id here' local sound = Instance.new('Sound',workspace) sound.SoundId = 'rbxassetid://'..id

buttonnamehere.MouseButton1Click:connect(function() sound:Stop() end)

Ad

Answer this question