So as you guys know doing CFrame.new(pos,look) will create a CFrame at pos oriented to look.

I was wondering how you could make a CFrame that is offset from another point that can only rotate around said point but still have it’s lookVector face the look position.

If I do,

while wait() do
part1.CFrame = CFrame.new((part0.CFrame * CFrame.new(0,part0.Size.Y/2,0)).p,target.CFrame.p)
end

I get the problem which is the part is centered on the offset point(which happens to be the top of another part).
That looks like this:

However, I can do

while wait() do
part1.CFrame = CFrame.new((part0.CFrame * CFrame.new(0,part0.Size.Y/2,0)).p,target.CFrame.p) * CFrame.new(0,part1.Size.Y/2,0)
end

This results in something that looks okay:

The problem is because I moved it up the angle is actually off by a little bit: https://gyazo.com/dac0c8b01ce83b2ce1bb4e2299426f54
It’s very little but I was wondering if there is a better method for getting an accurate CFrame?

Can you explain this some more I don’t quite get what you mean. What are you supposed to do with lookVectors?

Edit: I know what you mean now but the problem isn’t the rotation is being changed it’s that because the part is being moved up, it no longer points directly at where I intended it too

After like 2 hours of geometry (much longer than this should have taken, but it’s 2:30AM at the time of posting this), I got it working. If you have any questions I’ll answer them tomorrow when the rest of my brain is functional

local part = script.Parent
local base = workspace.Base
local target = workspace.Target
local radius = part.Size.Y/2
local basePos = base.Position + Vector3.new(0,base.Size.Y/2,0)
while wait() do
local a = basePos
local b = target.Position
local d = (a-b).Magnitude
local c = a.Y - b.Y
local B1 = math.acos(c/d)
local B2 = math.acos(radius/d)
local angle = math.pi - B1 - B2
local x = radius * math.sin(angle)
local y = radius * math.cos(angle)
local dir = Vector2.new(b.x-a.x,b.z-a.z).Unit
local position = basePos + Vector3.new(x*dir.X,y,x*dir.Y)
part.CFrame = CFrame.new(position,b)
end