I have this script that changes the wait based on the pitch, for some reason it goes past 120 UDim2 and goes really fast
local Audio = game.Workspace.Timer.Sound
local PitchLevel = Audio.Pitch
local Length = Audio.TimeLength
Audio.Changed:connect(function(SoundId)
for i = 0,120, 1 do
local diffrence = PitchLevel - 1
wait(1 - diffrence)
if Audio.IsPlaying == true then
script.Parent.Size = script.Parent.Size + UDim2.new(0,1,0,0)
else
script.Parent.Size = UDim2.new(0,0,0,0)
break
end
end
end)

1 comment
or just do: while difference > 1 do. Thats another loop you could try :)