Moving into a cot

Can you please tell me when you moved your baby into a cot and out of your room and did it help baby sleep all night?