Audio Occlusion / Muffle Sound Module (Free & Easy to Use)

Overview

This module adds a simple audio occlusion (muffle) effect to your game.
When a sound source is blocked by an object (wall, part, etc.), the sound is automatically muffled using a lowpass filter.

Designed to be plug & play, lightweight, and usable by anyone.


https://create.roblox.com/store/asset/113166152940396/AudioOcclusion-Module


Features

  • Automatic sound muffling behind walls
  • Client-side only (no remotes, no server load)
  • Tag-based system (CollectionService)
  • Adjustable muffling strength per sound
  • Easy to set up

Setup

  1. Place the module in ReplicatedStorage
  2. Require it from a LocalScript:
local AudioOcclusion = require(game.ReplicatedStorage.AudioOcclusion)
AudioOcclusion.Init()

Advanced Usage

Custom Muffling Strength

You can control how strong the muffling effect is per sound using the MuffledFactor attribute.

Value Effect
0 Almost no muffling
0.5 Medium muffling
1 Strong muffling

Example:

Adding the Tag

To enable the muffling effect on a sound, add the following tag to the Part containing the sound:

The module will automatically detect and handle it.


Optional: Custom Muffling Factor

By default, the muffling strength is set to 1.

If you want a different intensity, add the MuffledFactor attribute ranged from 0 to 1.


Optional: Disable sound through walls

If you want the sound to be completely muted when it’s blocked by a wall, you can add DisableSound attribute set to true.


Credits:

Made by @SilverDevsRBX

13 Likes
1 Like

Yeah, but it’s not good at all. So for some projects it’s better to muffle sounds with a modifier. Maybe later the acoustic sim will be better.

1 Like

is there backwards compatibility (Sounds)

1 Like

Yes, there are no issues with backwards compatibility.
Existing sounds will work fine, the only requirement is that the sound is played through an AudioPlayer.

NEW UPDATE VERSION (v2.2b)

https://create.roblox.com/store/asset/113166152940396/AudioOcclusion-Module

  • Added Better Muffling Raycast.
  • Fixed Some bugs.
  • New setting to set volume to zero for certains walls.

How to use:

  1. Add the DisableSoundEnabled tag to the part that play the sound.
  2. Add DisableSound attribute.
  3. Set it to true.
  4. And you are done!

Sounds and AudioPlayers are different types of sound emitters. So does this support Sounds? That’s what he is asking.

1 Like

yea i meant like INSTANCES, not in AUDIO API.

The “Audio API” is just a new set of audio related instances. Sound and SoundEffect instances are the old API.

1 Like

For now, it’s only for Audio Players wired to an Audio Emitter. But I hope I’ll be able to add Sounds Support later. But I really think Roblox wants to make Audio Player the only one version in the future.

It’s older and will probably be deprecated.

this is still in beta, and isnt out yet for the client

when will this have backwards compatibility for old sounds in parts and such?

1 Like

heh.. >:D

they really sent that out right as I commented bruh lol

Hello, I’m actually working on this. So I’ll tell you here when it will be updated!

Update 3.0


What’s new

  • Sound support — the module now works with both AudioPlayer and Sound instances
  • Several under-the-hood optimisations

Changes

The disable-sound system has been simplified. No tag needed on the wall anymore — just add a DisableSound attribute set to true on the part.


Benchmark

Tested over 12 114 frames (~70s):

avg: 0.068ms | min: 0.033ms | max: 0.604ms

Virtually no impact on frame budget.


Thanks to everyone who tried the module and left feedback, it really helps!

2 Likes

Update 3.1


Bug Fixes

  • FIxed a bug when DistanceAttenuation of Audio Emitter was {}, causing max distance to be nil.

Thanks for the reports, keep them coming!

2 Likes

Hey, sorry for the old topic revive but I’ve come across an issue. I would really love to use this in my project, although I can’t seem to get it working! I’ve followed your tutorial as best as I can and I don’t believe I’ve made any mistakes, still I can’t seem to hear any sort of difference when behind a wall. I’ve attached a video to show you just what i mean, and how my setup looks.

Hope to hear a response, thanks so much!

Hey, sorry for the late answer. If u followed the tutorial correctly it should be good. And also, you have to enable ‘useCharacterSoundsUseNewApi’ (idk if u did it).
Tell me if it still doesn’t work, so I can search more in depth.