✓ Accepted answer
You cannot set the lookVector of a CFrame, since it's read-only.
Since a CFrame's orientation is defined uniquely by two orthogonal vectors, setting one of them would result (usually) in an invalid second one (they would no longer be orthogonal); that is the reason this operation is not allowed.
Besides this, a lookVector can never be the 0 vector. lookVector is always a unit vector. The default orientation's lookVector is (0,0,-1)
You can construct a new CFrame pointing in a particular direction using the two-Vector3 CFrame.new constructor:
p.CFrame = CFrame.new( p.Position, p.Position + Vector3.new(0,0, -1 ));
1 comment
p is defined as Instance.new("Part"), by the way.