Target player mills two cards.
Draw a card.
Follow the instructions in the order listed on the card: if you target yourself, you’ll put the top two cards of your library into your graveyard and then draw a card.
If the target player is an illegal target when Thought Scour tries to resolve, it won’t resolve and none of its effects will happen. You won’t draw a card.