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)
Try this?
local sound = script.Parent.Parent:GetChildren() for i = 1, #sound do if sound:IsA ("Sound") then sound.Volume = 0 end end
Just wingin it here.