Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
AudioListener
Inherits from: Instance → Object
AudioListener records an audio stream from its surrounding AudioEmitters in the 3D world. It provides a single Output pin which can be connected to other pins via Wires. If the parent is an Attachment, Camera, or PVInstance, the parent's world CFrame will be used for listening. If the parent is not one of these classes, the AudioListener effectively hears nothing.
Inherits from: Instance
Memory category: Internal
Code samples: View on Creator Hub (audio-wiring---camera-listener).
Properties
| Name | Type / Returns | Description |
|---|---|---|
| AudioListener.AcousticSimulationEnabled | boolean | Determines whether acoustic simulation should be used for this AudioListener. |
| AudioListener.AngleAttenuation | BinaryString | Represents how the perceived volume of the emitted sound changes based on the angle between a AudioEmitter and the LookVector associated with the AudioListener. |
| AudioListener.AudioInteractionGroup | string | Controls which AudioEmitters are audible to this AudioListener. |
| AudioListener.DistanceAttenuation | BinaryString | Represents how the perceived volume of emitted sounds change as the distance between AudioEmitters and the AudioListener increases. |
| AudioListener.PositionInstance | Instance | The Instance whose position and orientation is used as the listener's position if PositionType is set to ListenerPositionType.Instance. |
| AudioListener.PositionType | ListenerPositionType | Determines how the AudioListener determines its 3D location. |
| AudioListener.SimulationFidelity | AudioSimulationFidelity | Controls how detailed the audio simulation should be for this AudioListener. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
AudioListener.AcousticSimulationEnabled
Determines whether sound being heard by this AudioListener shoud automatically implement features of acoustic simulation, such as occlusion (being muffled through walls), diffraction (bending around corners), and reverberation (echoing off of walls), when being sourced from an AudioEmitter. Note that the AudioEmitter also needs its AcousticSimulationEnabled property set to true for the effects to occur.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Simulation |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.AngleAttenuation
Represents a volume-over-angle curve that affects how loudly a AudioListener will hear the AudioEmitter, based on the angle between them and the LookVector associated with the AudioListener.
This property is internal and can't be accessed by scripts; it exists to support replication. See SetAngleAttenuation() for usage details.
| Field | Value |
|---|---|
| type | BinaryString |
| security | {"read":"RobloxEngineSecurity","write":"RobloxEngineSecurity"} |
| thread safety | ReadSafe |
| category | Listening |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.AudioInteractionGroup
Controls which AudioEmitters are audible to this AudioListener. Emitters that share an interaction group can be heard by this Listener.
| Field | Value |
|---|---|
| type | string |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Interactions |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.DistanceAttenuation
Represents a volume-over-distance curve that affects how loudly the AudioListener hears any AudioEmitters, based on the distance between them.
This property is internal and can't be accessed by scripts; it exists to support replication. See SetDistanceAttenuation() for usage details.
| Field | Value |
|---|---|
| type | BinaryString |
| security | {"read":"RobloxEngineSecurity","write":"RobloxEngineSecurity"} |
| thread safety | ReadSafe |
| category | Listening |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.PositionInstance
This property is only functional when PositionType is set to ListenerPositionType.Instance. In that scenario, this property determines which Instance will be used to determine the position of the AudioListener when hearing spatial audio from AudioEmitters.
If set to an instance without a position or nil, the AudioListener will not hear anything.
| Field | Value |
|---|---|
| type | Instance |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Listening |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.PositionType
The method by which the AudioListener determines its 3D location (the point from which any nearby AudioEmitters can be heard). Defaults to ListenerPositionType.Parent.
| Field | Value |
|---|---|
| type | ListenerPositionType |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Listening |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
AudioListener.SimulationFidelity
Deprecated.
Controls how detailed the audio simulation should be for this AudioListener, similar to MeshPart.CollisionFidelity or MeshPart.RenderFidelity.
AudioListeners and AudioEmitters which disagree on the necessary level of detail will use the less-detailed option.
| Field | Value |
|---|---|
| type | AudioSimulationFidelity |
| tags | ["Deprecated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Simulation |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Audio"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| AudioListener:GetAngleAttenuation | Dictionary | Gets the angle attenuation curve that the AudioListener is using, or an empty table if it's using the default curve. |
| AudioListener:GetAudibilityFor | float | Calculates how audible an AudioEmitter is for this listener |
| AudioListener:GetConnectedWires | List | Returns an array of Wires that are connected to the specified pin. |
| AudioListener:GetDistanceAttenuation | Dictionary | Gets the distance attenuation curve that the AudioListener is using, or an empty table if it's using the default curve. |
| AudioListener:GetInputPins | Array | Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property. |
| AudioListener:GetInteractingEmitters | List | Lists all AudioEmitters that this listener is capable of hearing. |
| AudioListener:GetOutputPins | Array | Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property. |
| AudioListener:SetAngleAttenuation | () | Sets the angle attenuation curve that the AudioListener should use, or uses a constant curve of volume 1 if none is provided. |
| AudioListener:SetDistanceAttenuation | () | Sets the distance attenuation curve that the AudioListener should use, or uses an inverse rolloff curve if none is provided. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
AudioListener:GetAngleAttenuation
Returns a table mapping angle to volume. Keys are numbers between 0 and 180 (inclusive), while values are numbers between 0 and 1 (inclusive) describing how volume attenuates depending on direction. This method returns an empty table if the default angle attenuation curve is being used.
Returns
| Type | Description |
|---|---|
| Dictionary | Table mapping angle to volume, as described above. |
| Field | Value |
|---|---|
| tags | ["CustomLuaState"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetAudibilityFor
Calculates how audible an AudioEmitter is for this listener. The resulting volume, ranging from 0 to 1, accounts for distance and angle attenuation on both the emitter and listener. Use this to drive game logic that depends on perceived loudness, such as proximity UI indicators or mechanics that scale with how clearly a sound source is heard.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| emitter | AudioEmitter | The AudioEmitter whose audibility should be calculated relative to this listener. |
Returns
| Type | Description |
|---|---|
| float | A number between 0 and 1 representing the combined volume after distance and angle attenuation from both the emitter and listener. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetConnectedWires
Returns an array of Wires that are connected to the specified pin. AudioListener has one "Output" pin.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| pin | string | An input or output pin on this instance |
Returns
| Type | Description |
|---|---|
| List | An array of Wires |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetDistanceAttenuation
Returns a table mapping distance to volume. Keys are numbers greater than or equal to 0, while values are numbers between 0 and 1 (inclusive) describing how volume attenuates over distance. This method returns an empty table if the default distance attenuation curve is being used.
Returns
| Type | Description |
|---|---|
| Dictionary | A table mapping distance keys to volume values, or an empty table if the default curve is being used. |
| Field | Value |
|---|---|
| tags | ["CustomLuaState"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetInputPins
Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.
For AudioListener, there are none.
Returns
| Type | Description |
|---|---|
| Array | An array of strings representing valid pin names. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetInteractingEmitters
Returns an array of AudioEmitters that share an AudioInteractionGroup with the listener.
Returns
| Type | Description |
|---|---|
| List | An array of AudioEmitters that share an AudioInteractionGroup with this listener. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:GetOutputPins
Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.
For AudioListener, this is Output only.
Returns
| Type | Description |
|---|---|
| Array | An array of strings representing valid pin names. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
AudioListener:SetAngleAttenuation
Sets a volume-over-angle curve that affects how loudly a AudioListener will hear the AudioEmitter, based on the angle between them and the LookVector associated with the AudioListener.
The curve is represented by a table mapping angle keys to volume values. Keys are expected to be unique numbers between 0 and 180 (inclusive), while values are expected to be numbers between 0 and 1 (inclusive). Tables containing up to 400 key-value pairs are supported.
The volume of a AudioEmitter from the perspective of the AudioListener at an angle a is determined by linearly interpolating between the volume levels for the points on the curve whose angle values are directly above and below a. If there is either no point below a or no point above a, the volume level of the other point is chosen. Essentially, the curve is a sequence of points connected by straight lines, and beyond its left and right endpoints the curve extends outward at their respective volume levels.
This volume will be multiplied with the volumes from all other attenuation curves (including the ones on the sending AudioEmitter) to obtain the final audibility.
If the table is empty or nil, the AudioListener defaults to using an angle attenuation curve with the constant volume value of 1.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| curve | Dictionary | A table mapping angle keys (0 to 180) to volume values (0 to 1), or an empty/nil table to use the default constant volume of 1. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["CustomLuaState"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
Code samples: View on Creator Hub (audio-wiring---directional-listener).
AudioListener:SetDistanceAttenuation
Sets a volume-over-distance curve that affects how loudly the AudioListener will hear any AudioEmitters, based on the distance between them. This is useful when you want a particular listener to have an extended or shortened hearing range — for example, a character with enhanced hearing — without modifying the emitting AudioEmitter or separating emitters and listeners into different interaction groups.
The curve is represented by a table mapping distance keys to volume values. Keys are expected to be unique numbers greater than or equal to 0, while values are expected to be numbers between 0 and 1 (inclusive). Tables containing up to 400 key-value pairs are supported.
The volume of a AudioEmitter from the perspective of the AudioListener at a distance d is determined by linearly interpolating between the volume levels for the points on the curve whose distance values are directly above and below d. If there is either no point below d or no point above d, the volume level of the other point is chosen. Essentially, the curve is a sequence of points connected by straight lines, and beyond its left and right endpoints the curve extends outward infinitely at their respective volume levels.
This volume will be multiplied with the volumes from all other attenuation curves (including the ones on the sending AudioEmitter) to obtain the final audibility.
If the table is empty or nil, the AudioListener defaults to applying a constant volume of 1 everywhere.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| curve | Dictionary | A table mapping distance keys (greater than or equal to 0) to volume values (0 to 1), or an empty/nil table to use the default constant volume of 1 everywhere. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["CustomLuaState"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Audio"] |
Events
| Name | Type / Returns | Description |
|---|---|---|
| AudioListener.WiringChanged | Fires when another instance is connected to or disconnected from the AudioListener via a Wire. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |
AudioListener.WiringChanged
Event that fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the AudioListener and to some other wirable instance.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| connected | boolean | Whether the instance got connected or disconnected. | |
| pin | string | The pin on the AudioListener that the Wire targets. | |
| wire | Wire | The Wire between the AudioListener and the other instance. | |
| instance | Instance | The other instance that is or was connected through the Wire. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["Audio"] |