I decided to go and hunt down an answer for this because although so far we have managed to keep playdough in the kitchen, which has a wooden floor, it is bound to happen sometime.
So, the official line from Hasbro is:
“When attempting to remove PLAY-DOH compound do NOT use hot water or
cleaning solutions of any kind. To remove PLAY-DOH compound from
carpet or fabrics, allow it to dry completely, and then loosen with a
stiff brush. It may be necessary to vacuum clean or wash with gentle
soap and cold water. You may need to repeat the process in order to
completely remove the PLAY-DOH compound.”
Amusingly, the first source of that guidance, which quoted Hasbros own information was a blog called Playdoughinmycarpet