I am trying to make something called a visualizer with Frames on a Surface gui but the frames start to lack behind and stop moving and i dont know why
Examples:
https://i.gyazo.com/b0445a2e000e7e1d0e32e5c127c39d53.mp4
Broken ^
https://i.gyazo.com/51ed0169ff961e6e621bbcf85dd9e691.mp4
The result i am trying to achieve ^
Here is my code
for i = 1,10 do
if i ~= 1 then
Robot.Colorizer.SurfaceGui[i].Size = Robot.Colorizer.SurfaceGui[i].Size:lerp(UDim2.new(0,5,0,Robot.Colorizer.SurfaceGui[i-1].Size.Y.Offset),.25)
Robot.Colorizer.SurfaceGui[i].BackgroundColor3 = Robot.Colorizer.SurfaceGui[i].BackgroundColor3:lerp(Robot.Colorizer.SurfaceGui[i-1].BackgroundColor3,.35)
else
Robot.Colorizer.SurfaceGui[i].Size = Robot.Colorizer.SurfaceGui[i].Size:lerp(UDim2.new(0, 5, 0, -Playback/15),.2)
Robot.Colorizer.SurfaceGui[i].BackgroundColor3 = Robot.Colorizer.SurfaceGui[i].BackgroundColor3:lerp(color,.35)
end
end
This all being run through a loop.
The playback variable being the volume of the song (Just a fluctuating number)

Here is what the frames and such looks like in explorer