✓ Accepted answer
I'm assuming you destroying and cloning the songs again is what you were doing to "mute" the songs, but it's a whole lot easier than you realize.
local function songs()
game.Workspace.Songs.DarudeSand:Play()
wait(123)
game.Workspace.Songs.Bangarang:Play()
wait(94)
game.Workspace.Songs.ET:Play()
wait(119)
game.Workspace.Songs.Poison:Play()
end
local isMuted = false
local function mute()
game.Workspace.Songs.DarudeSand.Volume=0
game.Workspace.Songs.Bangarang.Volume=0
game.Workspace.Songs.ET.Volume=0
game.Workspace.Songs.Poison.Volume=0
isMuted = true
end
local function resume()
game.Workspace.Songs.DarudeSand.Volume=1
game.Workspace.Songs.Bangarang.Volume=1
game.Workspace.Songs.ET.Volume=1
game.Workspace.Songs.Poison.Volume=1
isMuted = false
end
songs()
script.Parent.Parent.StarterGui.ShopAct.Frame.ImageButton.MouseButton1Click:Connect(function()
if isMuted = false then
mute()
else
resume()
end
end)
So you actually don't have any code here that mutes it, is why it is never being muted. What you were doing before was completely stopping the music by destroying it. This way, you can mute it, and unmute it, and it will continue playing even as it's muted.
Also I said you could add reverb to sounds, and to do that you right click the sound and insert object, and then you can add sound effects which each have additional properties you can mess around with.
2 comments
Use game.Workspace.Songs.Songname:Stop()
That is actually incorrect, if you want to mute it, you would just set the volume to 0.