Help with muting music

oh ok


but I’ll send it anyways just in case

Here’s the solution;

local music = game.ReplicatedStorage:FindFirstChild("CurrentMusic")

local debounce = false

script.Parent.MouseButton1Click:Connect(function()
	if debounce == false and music then
		debounce = true
		
		script.Parent.Text = "Unmute Music"
		music.Volume = 0
		
	else
		wait(0.5)
		debounce = false
		
		script.Parent.Text = "Mute Music"
		music.Volume = 0.5
	end
end)

It worked for me and should also work for you

Yo it worked! Thank You for Helping!

1 Like

Put the one as solution so people don’t have to go through the full post and also no problem!

1 Like