You can respond in a thoughtful and gracious manner by saying something like:
"Thank you for your kind words and condolences. I’ll make sure to pass them along. I know they will appreciate the support during this difficult time."
Feel free to adjust it to match your voice and the specific situation as needed.