Making multiple raycasts to track bullet

Im trying to make a anti air system, and for the gameplay the bullets are intentionally slow. To track the client-sided bullets I’m using raycasts, however I am very tired and very inexperienced with using raycasts, so this simple concept is clogging my foggy head.

My raycasts currently get longer over time, and don’t actually progress with the bullet (image reference if it helps below, what I have is A. and what I want is B)

For anyone curious, this is my current code for the raycasting

			for index = 0, max_range, (max_range / bullet_checks) do
				raycast_direction = raycast_origin.CFrame.LookVector * -index --increases raycast size
				raycast_result = workspace:Raycast(raycast_origin.Position, raycast_direction)
				
				if (raycast_result ~= nil) then
					raycast_distance += raycast_result.Distance --Adds distance of contact onto other raycasts
					break
				elseif(index == max_range) then
					raycast_distance = nil --Distance not allocated within bullet's range
					break
				end
				raycast_distance += index --Since no object was found on this RC, it adds the index to the sum
				task.wait((max_range / bullet_checks) / round_SPS) --Wait until new Raycast
			end

You’ll want to track a few things:

  1. t₀ start time
  2. x₀ start position
  3. v₀ start velocity
  4. a constant acceleration (e.g. gravity)

Then, on each update you can calculate some new variables:

  1. t delta time (calculated as current time - start time)
  2. x₁ current position by plugging everything into a kinematics equation
  3. last position updated at the end of each frame to be the calculated x₁ current position (and initialized as the x₀ on the first frame)

x₁ = x₀ + v₀t + (1/2)at²

In luau, this might look something like

local currentPosition = startPosition + startVelocity * deltaTime + (1/2) * acceleration * deltaTime ^ 2

With some simple vector math, you then have what you need to perform a raycast from last position to x₁ current position