Why doesn't this script mute all of the sounds? It is a localscript.
local player = game:GetService("Players").LocalPlayer
local Hidden = player:WaitForChild("Hidden")
local gui = script.Parent
local Button = script.Parent:WaitForChild("BackFrame").TextButton
Button.Activated:Connect(function()
if Button.Text == "Mute" then
Button.Text = "Unmute"
elseif Button.Text == "Unmute" then
Button.Text = "Mute"
end
if Button.Text == "Unmute" then
local Children = script.Parent.Parent.Sounds:GetChildren()
for i, v in pairs(Children) do
if v:IsA("Sound")then
v.Volume = 0
end
end
end
if Button.Text == "Mute" then
local Children = script.Parent.Parent.Sounds:GetChildren()
for i, v in pairs(Children) do
if v:IsA("Sound")then
v.Volume = 1
end
end
end
end)

1 comment
You could use v:Stop() and also i think it's because you're using the buttons text and i'm sure it won't update. I never used that type of system so i could be wrong though!