# Sound

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Internal
- HTML page: https://rapi.sleaze.dev/classes/Sound/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Sound

An object that emits sound. This object can be placed within a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md) to emit a sound from a particular position within a place or world, or it can be attached elsewhere to play the sound at a constant volume throughout the entire place.

## Properties

### AudioContent

```luau
Sound.AudioContent: Content
```

- Tags: Read capabilities: LegacySound

A reference to an audio asset.

### ChannelCount

```luau
Sound.ChannelCount: number = 0
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: LegacySound

### IsLoaded

```luau
Sound.IsLoaded: boolean = false
```

- Tags: Read only, Read capabilities: LegacySound

This property is `true` when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) has loaded from Roblox servers and is ready to play.

### SoundId

```luau
Sound.SoundId: string = ""
```

- Tags: Read capabilities: LegacySound

Content ID of the sound file to associate with the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

### TimeLength

```luau
Sound.TimeLength: number = 0
```

- Tags: Read only, Read capabilities: LegacySound

The length of the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) in seconds.

### AssetRepresentation

```luau
Sound.AssetRepresentation: Enum.AssetRepresentation = Enum.AssetRepresentation.FullLength
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: LegacySound

### IsSpatial

```luau
Sound.IsSpatial: boolean = false
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: LegacySound

### PlayOnRemove

```luau
Sound.PlayOnRemove: boolean = false
```

- Tags: Read capabilities: LegacySound

When `true`, the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) will play when it is removed from the experience.

### UsageContextPermission

```luau
Sound.UsageContextPermission: Enum.UsageContext = Enum.UsageContext.Default
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: LegacySound

### PlayingReplicator

```luau
Sound.PlayingReplicator: boolean = false
```

- Tags: Hidden, Not scriptable, Read capabilities: LegacySound

### TimePositionReplicator

```luau
Sound.TimePositionReplicator: number = 0
```

- Tags: Hidden, Not scriptable, Read capabilities: LegacySound

### EmitterSize

```luau
Sound.EmitterSize: number = 10
```

- Tags: Deprecated, Read capabilities: LegacySound, Load only
- Use instead: [`Sound.RollOffMinDistance`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This property has deprecated in favor of [`Sound.RollOffMinDistance`](https://rapi.sleaze.dev/classes/Sound.md) and [`Sound.RollOffMaxDistance`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead in new work.

The minimum distance, in studs, at which a 3D [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) (direct child of a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md)) will begin to attenuate (decrease in volume).

### MaxDistance

```luau
Sound.MaxDistance: number = 10000
```

- Tags: Deprecated, Read capabilities: LegacySound
- Use instead: [`Sound.RollOffMaxDistance`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This property has deprecated in favor of [`Sound.RollOffMinDistance`](https://rapi.sleaze.dev/classes/Sound.md) and [`Sound.RollOffMaxDistance`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead in new work.

The maximum distance, in studs, a client's listener can be from the `Sound\s` origin and still hear it. Only applies to Sounds parented to a [`Part`](https://rapi.sleaze.dev/classes/Part.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md) (3D sounds).

### MinDistance

```luau
Sound.MinDistance: number = 10
```

- Tags: Deprecated, Read capabilities: LegacySound, Load only
- Use instead: [`Sound.RollOffMinDistance`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** MinDistance has been superseded by [`Sound.EmitterSize`](https://rapi.sleaze.dev/classes/Sound.md), whose name better describes this properties behavior.

The minimum distance at which a 3D [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) (direct child of a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md)) will begin to attenuate. Effectively, the emitter size.

### Pitch

```luau
Sound.Pitch: number = 1
```

- Tags: Deprecated, Read capabilities: LegacySound, Load only
- Use instead: [`Sound.PlaybackSpeed`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This property has been deprecated in favor of [`Sound.PlaybackSpeed`](https://rapi.sleaze.dev/classes/Sound.md) whose name suits the behavior better.

Sets how high pitched and fast a [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is when it is played. The greater the integer, the higher and faster the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is.

### isPlaying

```luau
Sound.isPlaying: boolean = false
```

- Tags: Deprecated, Read only, Read capabilities: LegacySound
- Use instead: [`Sound.IsPlaying`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This deprecated property is a variant of [`Sound.IsPlaying`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead.

### xmlRead_MaxDistance_3

```luau
Sound.xmlRead_MaxDistance_3: number = 10000
```

- Tags: Deprecated, Hidden, Not replicated, Not scriptable, Read capabilities: LegacySound, Load only
- Use instead: [`Sound.RollOffMaxDistance`](https://rapi.sleaze.dev/classes/Sound.md)

### xmlRead_MinDistance_3

```luau
Sound.xmlRead_MinDistance_3: number = 10
```

- Tags: Deprecated, Hidden, Not replicated, Not scriptable, Read capabilities: LegacySound, Load only
- Use instead: [`Sound.RollOffMinDistance`](https://rapi.sleaze.dev/classes/Sound.md)

### AcousticSimulationEnabled

```luau
Sound.AcousticSimulationEnabled: boolean = true
```

- Tags: Capabilities: LegacySound

### RollOffMaxDistance

```luau
Sound.RollOffMaxDistance: number = 10000
```

- Tags: Read capabilities: LegacySound

The maximum distance, in studs, a client's listener can be from the sound's origin and still hear it. Only applies to `Sounds` parented to a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md).

### RollOffMinDistance

```luau
Sound.RollOffMinDistance: number = 10
```

- Tags: Read capabilities: LegacySound

The minimum distance, in studs, at which a [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) which is parented to a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md) will begin to attenuate (decrease in volume).

### RollOffMode

```luau
Sound.RollOffMode: Enum.RollOffMode = Enum.RollOffMode.Inverse
```

- Tags: Read capabilities: LegacySound

Controls how the volume of a [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) which is parented to a [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) or [`Attachment`](https://rapi.sleaze.dev/classes/Attachment.md) attenuates (fades out) as the distance between the listener and parent changes.

### IsPaused

```luau
Sound.IsPaused: boolean = true
```

- Tags: Hidden, Read only, Read capabilities: LegacySound

Read-only property which returns `true` when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is not playing.

### IsPlaying

```luau
Sound.IsPlaying: boolean = false
```

- Tags: Hidden, Read only, Read capabilities: LegacySound

Read-only property which returns `true` when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is playing.

### Looped

```luau
Sound.Looped: boolean = false
```

- Tags: Read capabilities: LegacySound

Sets whether or not the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) repeats once it has finished playing.

### PlaybackLoudness

```luau
Sound.PlaybackLoudness: number = 0
```

- Tags: Read only, Read capabilities: LegacySound

A number between `0` and `1000` indicating how loud the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is currently playing back.

### PlaybackRegionsEnabled

```luau
Sound.PlaybackRegionsEnabled: boolean = false
```

- Tags: Read capabilities: LegacySound

If `true`, this property gives your [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) access to the [`PlaybackRegion`](https://rapi.sleaze.dev/classes/Sound.md) and [`LoopRegion`](https://rapi.sleaze.dev/classes/Sound.md) properties which can more-accurately control its playback.

### PlaybackSpeed

```luau
Sound.PlaybackSpeed: number = 1
```

- Tags: Not replicated, Read capabilities: LegacySound

Determines the speed at which a [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) will play, with higher values causing the sound to play faster and at a higher pitch.

### Playing

```luau
Sound.Playing: boolean = false
```

- Tags: Not replicated, Read capabilities: LegacySound

Indicates whether the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is currently playing.

### RollOffGain

```luau
Sound.RollOffGain: number = 1
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: LegacySound

### TimePosition

```luau
Sound.TimePosition: number = 0
```

- Tags: Not replicated, Read capabilities: LegacySound

Progress of the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) in seconds. Can be changed to move the playback position of the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) both before and during playback.

### Volume

```luau
Sound.Volume: number = 0.5
```

- Tags: Read capabilities: LegacySound

The volume of the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

### LoopRegion

```luau
Sound.LoopRegion: NumberRange = NumberRange.new(0, 60000)
```

- Tags: Read capabilities: LegacySound

A range denoting a desired loop start and loop end within the [`PlaybackRegion`](https://rapi.sleaze.dev/classes/Sound.md), in seconds.

### PlaybackRegion

```luau
Sound.PlaybackRegion: NumberRange = NumberRange.new(0, 60000)
```

- Tags: Read capabilities: LegacySound

A range denoting a desired start and stop time within the [`TimeLength`](https://rapi.sleaze.dev/classes/Sound.md), in seconds.

### SoundGroup

```luau
Sound.SoundGroup: SoundGroup
```

- Tags: Read capabilities: LegacySound

The [`SoundGroup`](https://rapi.sleaze.dev/classes/SoundGroup.md) that is linked to this [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

## Methods

### GetPlaybackState

```luau
Sound:GetPlaybackState(): string
```

- Tags: Roblox script security, Capabilities: LegacySound

### GetUnderlyingAudioPlayer

```luau
Sound:GetUnderlyingAudioPlayer(): AudioPlayer
```

- Tags: Roblox script security, Capabilities: LegacySound

### GetWorldCFrame

```luau
Sound:GetWorldCFrame(): CFrame?
```

- Tags: Roblox script security, Capabilities: LegacySound

### Pause

```luau
Sound:Pause()
```

- Tags: Capabilities: LegacySound

Pauses playback of the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) if it is playing.

### Play

```luau
Sound:Play()
```

- Tags: Capabilities: LegacySound

Plays the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

### Resume

```luau
Sound:Resume()
```

- Tags: Capabilities: LegacySound

Resumes the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

### Stop

```luau
Sound:Stop()
```

- Tags: Capabilities: LegacySound

Stops the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md).

### pause

```luau
Sound:pause()
```

- Tags: Deprecated, Capabilities: LegacySound
- Use instead: [`Sound.Pause`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This deprecated function is a variant of [`Sound:Pause()`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead.

### play

```luau
Sound:play()
```

- Tags: Deprecated, Capabilities: LegacySound
- Use instead: [`Sound.Play`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This deprecated function is a variant of [`Sound:Play()`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead.

### stop

```luau
Sound:stop()
```

- Tags: Deprecated, Capabilities: LegacySound
- Use instead: [`Sound.Stop`](https://rapi.sleaze.dev/classes/Sound.md)

**Deprecated:** This deprecated function is a variant of [`Sound:Stop()`](https://rapi.sleaze.dev/classes/Sound.md) which should be used instead.

## Events

### DidLoop

```luau
Sound.DidLoop: RBXScriptSignal<(soundId: string, numOfTimesLooped: number)>
```

- Tags: Capabilities: LegacySound

Fires whenever the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) loops.

### Ended

```luau
Sound.Ended: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) has completed playback and stopped.

### Loaded

```luau
Sound.Loaded: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is loaded.

### Paused

```luau
Sound.Paused: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires whenever the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is paused using [`Pause()`](https://rapi.sleaze.dev/classes/Sound.md).

### Played

```luau
Sound.Played: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires whenever the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is played using [`Play()`](https://rapi.sleaze.dev/classes/Sound.md).

### PlayingUpdatedFromClient

```luau
Sound.PlayingUpdatedFromClient: RBXScriptSignal<(value: boolean)>
```

- Tags: Hidden, Roblox engine security, Capabilities: LegacySound

### PlayingUpdatedFromServer

```luau
Sound.PlayingUpdatedFromServer: RBXScriptSignal<(value: boolean)>
```

- Tags: Hidden, Roblox engine security, Capabilities: LegacySound

### Resumed

```luau
Sound.Resumed: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is resumed using [`Resume()`](https://rapi.sleaze.dev/classes/Sound.md).

### Stopped

```luau
Sound.Stopped: RBXScriptSignal<(soundId: string)>
```

- Tags: Capabilities: LegacySound

Fires when the [`Sound`](https://rapi.sleaze.dev/classes/Sound.md) is stopped through using [`Stop()`](https://rapi.sleaze.dev/classes/Sound.md).

### TimePositionUpdatedFromClient

```luau
Sound.TimePositionUpdatedFromClient: RBXScriptSignal<(newPositionSeconds: number, lastLuaSetTimePosition: number)>
```

- Tags: Hidden, Roblox engine security, Capabilities: LegacySound

### TimePositionUpdatedFromServer

```luau
Sound.TimePositionUpdatedFromServer: RBXScriptSignal<(newPositionSeconds: number, lastLuaSetTimePosition: number)>
```

- Tags: Hidden, Roblox engine security, Capabilities: LegacySound

### playbackActionSync

```luau
Sound.playbackActionSync: RBXScriptSignal<(action: number)>
```

- Tags: Hidden, Roblox engine security, Capabilities: LegacySound

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
