-
What do you want to achieve?
I want to add a mute button in my game that can mute/unmute audio added by an admin command.
(Example: Someone runs the command :music 1839627997, a player can then mute/unmute the audio) -
What is the issue?
When I add a sound into Workspace without using the music command the mute feature works fine. But after using the :music ID command from Adonis Admin, the mute button stops working. -
What solutions have you tried so far?
I’ve looked on the Dev Forum and also a whole bunch of YouTube tutorials, but nothing really talks about how Adonis Admin (or really any admin system in general) would affect a mute button script. -
After that, you should include more details if you have any.
I noticed when using the music command, it creates a Sound in Workspace called “ADONIS_SOUND” when in-game. So in Studio, I named the sound to ADONIS_SOUND thinking that maybe it would recognize it as the same object after using the music command. But that didn’t work.
Method 1 with the Sound added to Workspace:
Method 2 without the Sound added to Workspace:
The LocalScript inside of the TextButton:
local music = game.Workspace.ADONIS_SOUND script.Parent.MouseButton1Click:Connect(function() if music.Volume == 0 then music.Volume = 1 else music.Volume = 0 end end)