script.Parent.MouseButton1Down:Connect(function() local music = script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.LocalBackgroundMusic:WaitForChild("BGM") if music.Volume > 0.7 then music.Volume = 0 script.Parent.Text = "Unmute Music" elseif music.Volume < 0.7 then music.Volume = 0.7 script.Parent.Text = "Mute Music" end end)
If the volume is 0.7, nothing will happen.
script.Parent.MouseButton1Down:Connect(function() local music = script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.LocalBackgroundMusic:WaitForChild("BGM") if music.Volume >= 0.7 then music.Volume = 0 script.Parent.Text = "Unmute Music" else music.Volume = 0.7 script.Parent.Text = "Mute Music" end end)
This checks whether the volume is bigger than or equal to 0.7, but the original only does stuff when the volume is bigger than 0.7.