#Mute Button not working

1 messages · Page 1 of 1 (latest)

zealous cove
#

local gui = script.Parent.Parent
local imageButton = script.Parent
local Frame = gui:FindFirstChild("Frame")
local sfxButton = Frame:FindFirstChild("sfxButton")
local musicButton = Frame:FindFirstChild("musicButton")
local borderStroke = sfxButton:WaitForChild("BorderStroke")
local borderStroke2 = musicButton:WaitForChild("BorderStroke")

Frame.Visible = false

imageButton.MouseButton1Click:Connect(function()
Frame.Visible = not Frame.Visible
end)

-- SFX Button
sfxButton.MouseButton1Click:Connect(function()
local sfx = game.SoundService:FindFirstChild("SFX")
if not sfx then
warn("SFX sound not found in SoundService")
return
end

if sfx.Volume == 1 then
    sfx.Volume = 0
    borderStroke.Color = Color3.new(1, 0, 0)
    print("SFX: Volume set to 0")
else
    sfx.Volume = 1
    borderStroke.Color = Color3.new(0, 0, 0)
    print("SFX: Volume set to 1")
end

end)

-- Music Button
musicButton.MouseButton1Click:Connect(function()
local music = game.SoundService:FindFirstChild("Music")
if not music then
warn("Music sound not found in SoundService")
return
end

if music.Volume == 1 then
    music.Volume = 0
    borderStroke2.Color = Color3.new(1, 0, 0)
    print("Music: Volume set to 0")
else
    music.Volume = 1
    borderStroke2.Color = Color3.new(0, 0, 0)
    print("Music: Volume set to 1")
end

end)

#

What i'm trying to do is make clicking the mute button mute the soundgroup so the sounds inside it won't make noise

north hamlet
#

i never work with sound system but have test checking properties?

#

i judt mess around properties if i don't know how things function

plain elbow
#

Show output