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

How to Mute sound?

Asked by 9 years ago

So my game plays music. I made a button and all to mute the Music but it wont work. Not only that, I kinda feel like this will mute the music in the server not only the one person. Little help please? Heres the code:

function onClicked(player) 
game.Workspace.Music.Music:pause()
end 
script.Parent.MouseButton1Click:connect(onClicked)

0
Do you want it to mute for Everyone or the person who clicked? bbissell 346 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

If you want to mute it for just one person you would have to create a new sound Instance for each person not have one sound Instance for everyone.

LocalScript:

local Sound = Instance.new("Sound", game.Lighting)
Sound.SoundId = "rbxassetid:\\1111"
Sound:Play()
0
Please refrain from downvoting correct answers just to get kicks fw8gw9gw8g 55 — 9y
0
I was not me. CrispyBrix 113 — 9y
Ad

Answer this question