Make part face where the camera is looking

How do I make my part face where my camera is facing???
I tried using,camera.Position)

Didnt work
and,camera.CFrame.LookVector) --I tried Multiplying the lookvector with different numbers but still doesnt work

You can get the camera’s CFrame’s orientation, assuming you already have the camera’s CFrame:

local camOrientation = camCFrame-camCFrame.Position;

You can then apply that orientation to the part:

part.CFrame =*camOrientation;

Part.CFrame = Camera.CFrame or Part.CFrame =,Part.Position+Camera.CFrame.LookVector) if you want the part to be not on the camera

This is now deprecated:

You should use this:

function lookAt(target, eye)
    local forwardVector = (eye - target).Unit
    local upVector =, 1, 0)
    -- You have to remember the right hand rule or google search to get this right
    local rightVector = forwardVector:Cross(upVector)
    local upVector2 = rightVector:Cross(forwardVector)
    return CFrame.fromMatrix(eye, rightVector, upVector2)