PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

PlaybackLoudness

Sound

double

A number between 0 and 1000 indicating how loud the Sound is currently playing back.

This property reflects the amplitude of the Sound's playback in the instance of time it is read. Therefore, for most sounds it will fluctuate constantly. Due to this it can appear in the Roblox Studio properties window as 0, however when read by code in the command bar or Scripts it will return the correct value.


Code Samples


Volume Amplitude Bar

In this sample Sound.PlaybackLoudness is used to create an amplitude bar that shows the amplitude of a sound playing.

This code sample should be placed in StarterPlayerScripts.

A simple GUI is created, a frame holding that bar and a frame containing the bar. A Sound is then played and the size of the bar is set to reflect the Sound.PlaybackLoudness on a loop.