Hello everyone! The title might sound a bit confusing to you but I’ll explain it right here,
so basically I have a folder in workspace that contains all the lobby music tracks I have, then a script selects a random one and plays it. The catch here is, it doesn’t immediately start playing, I have a tween that just adjusts the volume slowly to make it feel like a fade-in effect. And this whole system is handled in the server-side. Now, how do I make a mute music button that will obviously be handled in the client-side. If I didn’t have the fade effects, that’d be rather simple. Iterating through all the tracks and setting the volume to 0. But I think the tween raising it again will override this and the client will still be able to hear it. Here are some ideas I have; handling the fade effects in client side, removing the fade effects altogether or handling the music player in the client-side. I just need some ideas on how the mute music button can be implemented. I don’t need any scripts, Thanks!
1 Like
Use sound groups for this, go to soundservice and insert new soundgroup object, name it “Music”. After that go to the properties of the music object in workspace and change the SoundGroup to “Music”.
Then, in the localscript, use this function to change the volume multiplier of the sound group
game:GetService("SoundService").Music.Volume = 1
It didn’t even come to my mind that I could use soundgroups for this! And it worked flawlessly!
Teşekkürler hocam
2 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.