I recently asked a question how you can mute all sound and I got the answer from RoCopSSS but i'm not sure how I can put them both into a single button
mute
local store = {}
for i, object in pairs(workspace:GetDescendants()) do
if object.ClassName == "Sound" then
table.insert(store, #store + 1, {['Object'] = object, ['Vol'] = object.Volume})
object.Volume = 0
end
end
end
unmute
for i, v in pairs(store) do -- reads store table
if v.Object then -- checks if the object still exists
v.Object.Volume = v.Vol -- sets the object value to the saved volume value
end
end
everything I've tried has errored any help?

1 comment
how exactly would i make it not just for workspace but all the things like replicated and all them