Cylinder part CFrame issue

So I want to make a cylinder face a specific vector3 position

As you can see from the image above I want the cylinder to look at that grey part but instead it looks the other side.

I tried subtracting 90* on the XYZ but it won’t fix the issue.

I assume there is already a solution to this but I can’t seem to find it, a little help would be much appreciated please.

Cylinder.CFrame = - (Marker.Position - Hit.Position)/2 , Marker.Position)
1 Like

You can multiply by CFrame.Angles(0, math.pi / 2, 0) to rotate the resultant CFrame. Also, consider using CFrame.lookAt(position, target), as the, Vector3) constructor is deprecated.


If you want it to look at something. Use CFrame.LookAt

do this:

Cylinder.CFrame = CFrame.lookAt(Cylinder.Position, Marker.Position)

Thank you for the solution also it works fine. Also I never knew, Vector3) is deprecated thank you from informing me.

Thank you for the reply this one works as well but it does not fix the issue don’t worry tho @Ozzypig gave the solution.