Sound¶
Sounds are objects that can be placed in the world and emit audio.
Inherits DynamicInstance
Events¶
Loaded¶
The event that is fired when the sound is loaded from the server.
Example
sound.Loaded:Connect(function()
sound.Play()
end)
Methods¶
Play → void
¶
Plays the sound.
Stop → void
¶
Stops playing the sound.
Properties¶
Autoplay : boolean
¶
Determines whether the sound should start playing automatically.
Length : float
¶
Returns the length of the currently loaded audio
Loop : boolean
¶
Determines whether the sound should loop or not.
Pitch : float
¶
The pitch of the sound.
PlayInWorld : boolean
¶
When enabled, the sound will be played in 3D world space rather than having the same volume for everyone.
MaxDistance : float
¶
Specifies how far the player must be from the sound for it to stop playing, if the PlayInWorld
property is set to true.
Playing : boolean
¶
Determines whether the sound is currently playing or not.
Size : Vector3¶
The size of the sound.
SoundID : int
¶
The asset ID of the sound.
Time : float
¶
The time position the track is currently on.
Volume : float
¶
The volume of the sound.