I'm setting the playback speed for a sound, why can't I hear a difference?
I've made a pickup script and I wanted to add a sound effect that varies in pitch, I've setup the script so the sound's PlaybackSpeed is randomized, then print the PlaybackSpeed afterwards so I can ensure it's working. The issue is, while the printed text shows that the PlaybackSpeed was indeed randomized you cannot hear a difference at all.
Here is the script, it's in a normal script
01 | math.randomseed(tick()) |
02 | local crate = script.Parent |
03 | local invCrate = game.ReplicatedStorage [ "Light Crate" ] |
04 | local sound = script.Parent.Pop |
06 | script.Parent.ClickDetector.MouseClick:connect( function (player) |
07 | print (player, " picked up " , script.Parent) |
09 | sound.PlaybackSpeed = math.random() + 0.1 |
10 | print (sound.PlaybackSpeed) |
12 | local newPart = invCrate:Clone() |
13 | newPart.Parent = player.Backpack |
and the sound part has PlayOnRemove
set so it'll play when the crate is picked up