A crumbly cookie could be due to several things:
-- Too much flour can cause a crumbly cookie. Make sure to measure flour by spooning through it lightly in its container to lighten it, then spoon lightly into a dry measuring cup (not those with spouts meant for measuring liquid ingredients). Then use a straight-edge tool to level the top of the measure.
-- Not enough fat or the wrong kind of fat can cause a crumbly cookie. Make sure when measuring the amount of butter or shortening called for you use the correct amount from the stick (for example, if it calls for 1/2 cup butter, use 1 whole stick, not 1/2 of the stick). Use real butter when called for and not substitutes. Butter substitutes and margarine contain water and can actually cause crumbly texture since they lack the fat to coat all of the flour.
-- Overbaking can also cause a crumbly cookie. Test your oven to make sure it is baking properly by baking a cake mix cake. If the cake is done in the time range on the package, your oven is most likely baking at an accurate temperature. If not, consult your manufacturer's directions or an appliance specialist.
-- A texture difference can come from the type of cookie sheet you use, such as a dark-coated baking sheet vs. an aluminum or shiny baking sheet. The dark-coated sheets attract more heat, so may cause more browning and a crumblier texture.