Is there a way to disable a sound whilst keeping the volume?

The title is pretty self explanatory…

Is there a way to disable a “Sound” in a script instead of setting the volume to 0? I am wanting to change multiple sounds at once, and I don’t want to change the volume to 0 because each sound has its own volume, and when the payer enables sound again, I don’t want them to all be the same volume.

3 Likes

I hope this can help you with your problem
image
https://developer.roblox.com/en-us/api-reference/class/Sound

3 Likes

If you use a Sound Group you can use its property Volume to set all volumes at once to zero.

2 Likes

What if I want to disable or “pause” a sound that isn’t playing?

My goal is to disable sounds, not set the volume to 0, but I’ll try out sound groups and see if it can help!

You could record the volume of a sound to a variable (ideally in a table) and keep the sound to volume 0. When you need it again, you can apply the volume back.

1 Like

I’ll try that out and let you know if it works or not, I’m not that experienced with tables so it will be a fun challenge!

What you could do, when reenabling the sounds, set it back to the volume that you want it to be, It’s what I usually do to disable audio and reenable it.

1 Like