PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Volume

Sound

float

The volume of the Sound. Can be set between 0 and 10. Defaults to 0.5

Note that if the Sound is a member of a SoundGroup its playback volume (but not the Volume property) will be influenced by the SoundGroup/Volume property of that SoundGroup. The effect of this is multiplicative, meaning that a sound will play at the same volume if its Volume is 0.1 and its SoundGroup's volume is 5 and vice-versa.


Code Samples


Sound Volume

This sample includes a demonstration of how a Sound’s volume can be set using the Sound.Volume property.

-- create a sound
local sound = Instance.new("Sound", game.Workspace)
sound.SoundId = "rbxassetid://301964312"
sound.Looped = true
sound.PlaybackSpeed = 2

-- make the sound loud
sound.Volume = 2

-- play the sound
sound:Play()

wait(7)

-- make the sound quiet
sound.Volume = 0.2