When you undress the dolls, they have a cord on their thighs you can pull and which will generate music.
I am not sure when is used correctly, but I feel I've heard people use when like this before.
The grammar is OK.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.