How to make a button that can mute boomboxes in a server

Please could i have this question answered?

Which of the many script postings above is the one you feel is working best, and I will look it over and see what I can do.

Also is the boombox a default Roblox Item one, or have you customized it?

1 Like

its the default

charcharcharchar

Show me the script you need help with, post your best version , and I will try to see why its muting everyone

Ok ill make a separate roblox game on the boombox and gibe you the game so you can see it all

Well, I didn’t need to see all of it, I just really needed to see the code you are using to try to mute the boomboxes, so I can see why it is muting all of them.

This is the script i am using to mute the boomboxes

and this is the script where when i try to fix it it completely breaks

yes you totally can by just checking if the player is localplayer
simple example of the script you sent

iconz
:setLabel("  Mute Boomboxes   ")
:setName("boomxes")
:bindEvent("selected", function(self)
	print(("%s was selected!"):format(self.name))
	iconz:setLabel("..Unmute Boomboxes..")
	bool = true
	bool2 = false
	while bool do
		for i,v in pairs(game.Players:GetPlayers()) do
			if v ~= game.Players.LocalPlayer then
			print(v.DisplayName)
			local backpack = v.Backpack
			if backpack:FindFirstChild("BoomBox") ~= nil then
				print("OK")
				local boombox = backpack:FindFirstChild("BoomBox")
				boombox.Handle.Sound.Volume = 0
			elseif v.Character:FindFirstChild("BoomBox") ~= nil then
				local boomboxc = v.Character:FindFirstChild("BoomBox")
				boomboxc.Handle.Sound.Volume = 0
				wait()
			end
		end
		end
	end
end)
:bindEvent("deselected", function(self)
	print(("%s was deselected!"):format(self.name))
	iconz:setLabel("  Mute Boomboxes   ")
	bool = false
	bool2 = true
	while bool2 do
		for i,v in pairs(game.Players:GetPlayers()) do
			if v ~= game.Players.LocalPlayer then
			print(v.DisplayName)
			local backpack = v.Backpack
			if backpack:FindFirstChild("BoomBox") ~= nil then
				print("OK")
				local boombox = backpack:FindFirstChild("BoomBox")
				boombox.Handle.Sound.Volume = 1
			elseif v.Character:FindFirstChild("BoomBox") ~= nil then
				local boomboxc = v.Character:FindFirstChild("BoomBox")
				boomboxc.Handle.Sound.Volume = 1
				wait()
			end
		end
	end
end
end)
})

Im guessing the stuff that errors for me is just from the topbar plugin that you said
i also changed the table because i didn’t see any real tables with the name “players”
if anything of this errors tell me what it says

Oh yes! It works very nicely thank you so so so much!

Thank you to everyone who helped me with this issue!

Don’t forget to mark nikos300’s response as ‘Solved’ if that solved your problem.

i did though

charcharcharcharcharcharcharchar

no problem im glad to help

charcharchar