How do I make a mute music button?
I'm trying to add a mute/unmute music button into my game but when i test it, it doesn't work.
Here is the script for the music:
01 | local Sound 1 = game.Workspace.Sound.Sound 1 |
02 | local Sound 2 = game.Workspace.Sound.Sound 2 |
03 | local Sound 3 = game.Workspace.Sound.Sound 3 |
And here is the mute music script:
01 | local sound 1 = game.Workspace.Sound |
02 | local text = script.Parent.TextLabel |
04 | script.Parent.MouseButton 1 Click:Connect( function () |
06 | if sound 1. Volume = = 0 then |
09 | text.Text = "Music: On" |
14 | text.Text = "Music: Off" |