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

PlaybackSpeed

Sound

float

Determines the speed at which a Sound will play. The greater the value the faster the sound will play back.

For example, a value of 2 will cause the Sound to play 2x faster, whereas a value of 0.5 will cause it to play 2x slower. When PlaybackSpeed is equal to 1, the sound will take Sound/TimeLength (in seconds) to complete.

Note that increasing the PlaybackSpeed of a sound will cause it to play at a higher pitch.


Code Samples


Sound PlaybackSpeed

In this example a Sound is played in the Workspace. The PlaybackSpeed property is increased and decreased at intervals to demonstrate its impact on the playback of the Sound.

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

sound:Play()
wait(10)
sound.PlaybackSpeed = 3 -- 3x faster
wait(5)
sound.PlaybackSpeed = 0.5 -- 2x slower
wait(5)
sound.PlaybackSpeed = 1 -- default