If you want to end up with all three legs not attached to anything the easiest way may be to do something like:
for(local cur in [leg1, leg2, leg3])
{
cur.attachments = [];
cur.attachedToList = [];
/* Then to have each leg carried by the player character: */
cur.moveInto(gPlayerChar);
}