How fix high angles CFrame.lookAt?

I have building script, which works almost perfect. The problem is in high angles - like 80-90, because it start to rotating part by 90-270 degrees, and ruining placement on wedge, cylinder and ball parts. Can someone say me, how I can fix that high angles issue with CFrame.lookAt?