Problem with my rhythm heaven fan-game

Hi! I’m working on a side project and it is a rhythm game.

The main problem is that the Reader() function is playing notes in a swing pattern:

For people who are familiar with music, I don’t want the pattern to be this:
2023-12-30_140629

I want it to be this:
2023-12-30_140755

This is the function in a script in StarterGUI:

function Reader(MapName) -- MapName is useless right now
	local last = tick()
	local time = 0
	
	for i = 1, #requiredModule.notes do
		time = last + (requiredModule.notes[i][1]/1000)
		
		repeat
			RunS.RenderStepped:Wait()
		until tick() > time -- waits until the tick() reaches over time
		
		if requiredModule.notes[i][2] == 1 then -- checks if the line in the module is 1 or 2
			local Root_S = Instance.new("Sound")
			Root_S.Parent = LocalSounds
			Root_S.SoundId = "rbxassetid://15812410789"
			Root_S.PlayOnRemove = true
			Root_S:Destroy()
		end
		
		coroutine.wrap(function() -- I plan to add animations later
			local RootClone = PlayerArea.Root:Clone()
			Angle = 270+((requiredModule.notes[i][1]/1000)*36)
			RootClone.Position = UDim2.fromOffset(((Radius+50) * math.sin(Angle * (math.pi/180)))+520, (Radius * math.cos(Angle * (math.pi/180)))+0)
			RootClone.Rotation = 0-Angle
			RootClone.Parent = PlayerArea
			RootClone.Name = i
			RootClone.Visible = true
		end)()
	end
end

Thank you for reading and any help will be appriciated :slight_smile: