How do you make a part's CFrame angled towards a target but in the manner of a hinge?

I am trying to make a pivoting part that pivots on the base of another part but in the direction of a target CFrame/Position.

My need is not something like this:


:x::x::x::x:

But rather something like this:

:heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark:

The only reason I am able to show what I need and it not be what I’m trying to do is because if the base part rotates it is no longer the same rotation-like axis of a CFrame. I need a reliable way that uses alot of math or something.

Mickey mouse strikes again.

I am going to use another way that is not so pleasing to the script eye but it gets the job done with questionable performance (trigonometry).