Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Do I Fix It So That It Doesn't The Music Muter Also Mutes Other Plays?

this is the script

the title says all

local muted = false

script.Parent.MouseButton1Click:Connect(function()
if muted == false then
    for i,player in pairs(game.Players:GetChildren()) do
            if player.Character.Head:FindFirstChild("Sound") ~= nil then
                if player ~= game.Players.LocalPlayer then
                    player.Character.Head:FindFirstChild("Sound").Volume = 0
                end
            end
        end
	muted = true
else
for i,player in pairs(game.Players:GetChildren()) do
            if player.Character.Head:FindFirstChild("Sound") ~= nil then
                if player ~= game.Players.LocalPlayer then
                    player.Character.Head:FindFirstChild("Sound").Volume = 25
                end
            end
        end
		muted = false
	end
end)

1 comment

0

Is your place using filtering enabled?

1 answer

You could try modifying the script so it works for only one player (LocalPlayer) or doing something like putting it in a Local Script

Or

You could use Filtering Enabled

This discussion is preserved as it was. New answers, comments, and votes are closed.