Generating a semi curve to point at another object

I am trying to have a point generate a curve that is being directed to another point (also taking into account the rotation of the parts). I have the code below which works for most angles however there seems to be an interval where it does not follow the ‘circle’ i generated. Ive spent a while attempting to fix it and im completely out of ideas. Let me know if you have any questions

local res = 5;
local angle
local radius = 2;
local parts = {}

--Generates the parts that will be curved
for i = 1, res, 1 do
	local p = Instance.new('Part');
	p.Anchored = true;
	p.Parent = workspace
	p.Size = Vector3.new(.6,.1,.1)
	parts[#parts + 1] = p;
end

local a = workspace.A
local b = workspace.B

while wait() do
	local x,y,z = CFrame.lookAt(a.Position, b.Position):ToOrientation()
	angle = y;
    local offSet = math.rad(a.Orientation.Y);
	local cPos;
	
	angle -= offSet
	if angle > 0 then
		angle = (math.pi - angle)
		cPos = (a.CFrame * CFrame.new(-Size.X/2, Size.Y/2 , Size.Z/2)).Position;	
	elseif angle < 0 then
		angle = -math.pi - angle 
		cPos = (a.CFrame * CFrame.new(Size.X/2, Size.Y/2 , Size.Z/2)).Position;
	else
		cPos = (a.CFrame * CFrame.new(Size.X/2, Size.Y/2 , Size.Z/2)).Position;
	end

	local steps = angle / res
	for i,p in ipairs(parts) do
		local step = steps * (i);
		step -= math.rad(a.Orientation.Y)

		local position = Vector3.new(math.cos(step) * radius ,0, math.sin(step) * radius) * (angle / math.abs(angle)) + cPos;

		p.Position = position;
		p.Rotation = Vector3.new(0, 180 - math.deg(step) ,0)
	end	
end

Pleas send more informations i understand your ploblem but i don`t know how shoud they point to each othet the points.Maybe a quick draving node would help.If you paint diffrent orentation anglens and how the points have to stay.Thnx

currently the curve does curve to the other part (usually). the issue is at a certain interval the position of the points on the curve get inversed and im not sure where or how.

Sorry im not sure what you mean by a drawing node.


Is it so correct?

yes. that is spot on (charlimit)