Hello. I’m stupid bad with CFrames and math in general so I apologise for the question. How would I get the CFrames of points A and B from the CFrame of the part in the Image I have attached?

I’ve tried subtracting and adding half the size of the part to it’s CFrame to get A and B respectively but they don’t seem to change when I’ve tried rotating the part.

Part.CFrame = Part.CFrame * CFrame.new(Part.Size.X/2, 0, 0)
You can play around with that code to see what you will get.
You should only change the “Part.Size.X/2” either by dividing by less or by adding a minus to it.

Part.CFrame = Part.CFrame * CFrame.new(Part.Size.X/2, 0, 0) * CFrame.Angles(0, math.rad(25), 0)
The code above will rotate the part 25 degrees in the end of the part.

I hope this helped! Please message me if you have any questions!

Make sure you learn about Object and World space.
Object space is relative to the CFrame
World space is relative to to the origin

part.CFrame * CFrame.new(0,0,Z/2) (a:ToWorldSpace(b)) for example will be a local transformation because it assumes <0,0,Z/2> is local to part.CFrame, converting it into world space (transforming part.CFrame) part.CFrame + Vector3.new(0,0,Z/2) is a global transformation