Nightmare Fredbear only appears on Night 5, with no other animatronics. Shining the flashlight at him when he is in the hall will attract him. If you hear him approaching from either side, shut the door. He also appears in the closet and on your bed, making it necessary for you to watch those areas as well.