function lookAt(target, eye)
local forwardVector = (eye - target).Unit
local upVector = Vector3.new(0, 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)
end
What is the Unit? Why is Cross? What is fromMatrix refering to? Why return from matrix, is it calling the function?

2 comments
I know you are interested about CFrame, but this website is a place for help on script errors. If you want, check out AlvinBlox on youtube. He has videos on CFrame and is great at explaining.
How do I downvote a comment? Nobody with a right mind suggests alvinblox