Boombox Mute Script Not Working

Hello, my name is F2aret. I’ve been working on a mute boombox button, but it doesn’t work. I used a local script and I tried changing somethings that might lead to the problem. But it still does not work. Here is the script if you want to see what I did wrong:

local enabled = true

script.Parent.Visible = true

function onClick()

if enabled == false then

game.ServerStorage.BoomBox.Client.Disabled = true

else

game.ServerStorage.BoomBox.Client.Disabled = false

end

end

script.Parent.MouseButton1Down:Connect(onClick)

If you have any idea what is wrong with the script, please contact me or leave a reply. Thanks :slight_smile:

Well for one you’re trying to access ServerStorage from a localscript which is available server-side only, and two disabling a script won’t get what you’re after.

What you should do is use a SoundGroup. With the boombox, when creating the sound, add a line of code like this to it: Sound.SoundGroup = game:GetService("SoundService"):FindFirstChild("Boomboxes")

Then with a localscript you can do game:GetService("SoundService"):FindFirstChild("Boomboxes").Volume = 0
to mute all sounds under that SoundGroup.

1 Like