There are a few reasons this could happen. First, use fresh marshmallows! Stale marshmallows, even when melted, will make the treats hard. Second, don't pack down the treats too hard when putting them into the pan. Gently pat them down to even the top. Last, don't add too many rice krispies. If you don't measure correctly, the proportions will be off causing the treats to be hard.