I dont know how to attempt a solid workaround with this. I need it to stay at a certain length from the main block while the main block moves. Might end up using alternatives like linear-velocities and such…
You can construct the CFrame differently to produce this effect:
local mainPart = workspace:WaitForChild("MainPart")
local rotation = 0
while task.wait() do
script.Parent.CFrame = mainPart.CFrame * CFrame.Angles(0, math.rad(rotation), 0) -- Rotate part
script.Parent.CFrame *= CFrame.new(0, 0, 5) -- Move part forwards (5 is the radius)
rotation += 1 -- Add rotation (1 is the speed)
if rotation > 360 then
rotation = 0
end
end
Not sure why you would need to use CFrame.lookAt (or as you put it in your code, CFrame.new(pos, lookAt)) because we already can reference the center part. This just seems inefficient.