Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
DistanceAttenuationMode
Determines how an AudioEmitter attenuates (fades out) as the distance between the AudioEmitter and an interacting AudioListener increases. Most values refer to a preset rolloff curve that the AudioEmitter will apply over the range given by DistanceAttenuationBounds. When set to DistanceAttenuationMode.Custom, the emitter instead uses a developer-supplied curve given by AudioEmitter:SetDistanceAttenuation().
Items
| Name | Value | Description |
|---|---|---|
| Custom | 0 | Uses the developer-supplied DistanceAttenuation curve for gain rolloff. |
| InverseTapered | 1 | Volume attenuates according to a hybrid model which follows the DistanceAttenuationMode.Inverse model when close to the lower bound of AudioEmitter.DistanceAttenuationBounds and the DistanceAttenuationMode.LinearSquared model when close to the upper bound of AudioEmitter.DistanceAttenuationBounds. This is done by taking the lesser of these two curves, such that the curve mostly follows an inverse relationship but tapers to silence at the maximum distance. |
| Linear | 2 | Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear relationship. This is done by computing (maxDistance - distance) / (maxDistance - minDistance), where distance is the Class.Vector3.Magnitude between the AudioEmitter's position and the AudioListener's position. |
| LinearSquared | 3 | Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear-squared relationship. This is done by squaring the formula used to determine the volume when using DistanceAttenuationMode.Linear, which creates a parabolic curve with a steeper fade. |
| Inverse | 4 | Volume attenuates from the lower bound of AudioEmitter.DistanceAttenuationBounds in an inverse manner, mirroring how sounds attenuate in the real world. This is done by computing (minDistance/distance), where distance is the Class.Vector2.Magnitude between the AudioEmitter's position and the AudioListener's position. |
Custom
Uses the developer-supplied DistanceAttenuation curve for gain rolloff.
| Field | Value |
|---|---|
| value | 0 |
InverseTapered
Volume attenuates according to a hybrid model which follows the DistanceAttenuationMode.Inverse model when close to the lower bound of AudioEmitter.DistanceAttenuationBounds and the DistanceAttenuationMode.LinearSquared model when close to the upper bound of AudioEmitter.DistanceAttenuationBounds. This is done by taking the lesser of these two curves, such that the curve mostly follows an inverse relationship but tapers to silence at the maximum distance.
| Field | Value |
|---|---|
| value | 1 |
Linear
Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear relationship. This is done by computing (maxDistance - distance) / (maxDistance - minDistance), where distance is the Class.Vector3.Magnitude between the AudioEmitter's position and the AudioListener's position.
| Field | Value |
|---|---|
| value | 2 |
LinearSquared
Volume attenuates between the bounds of AudioEmitter.DistanceAttenuationBounds with a linear-squared relationship. This is done by squaring the formula used to determine the volume when using DistanceAttenuationMode.Linear, which creates a parabolic curve with a steeper fade.
| Field | Value |
|---|---|
| value | 3 |
Inverse
Volume attenuates from the lower bound of AudioEmitter.DistanceAttenuationBounds in an inverse manner, mirroring how sounds attenuate in the real world. This is done by computing (minDistance/distance), where distance is the Class.Vector2.Magnitude between the AudioEmitter's position and the AudioListener's position.
| Field | Value |
|---|---|
| value | 4 |