[Machine] I heard the Messenger of Allah ﷺ say: "There are four types of people whose rewards continue to reach them after their death: a man who dies while defending the cause of Allah, a man who imparts knowledge and his reward continues to reach him through those who benefit from it, a person who gives charity and their reward continues to reach them through those who are affected by it, and a person who leaves behind a righteous child who prays for them."
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ أَرْبَعٌ تَجْرِي عَلَيْهِمْ أُجُورُهُمْ بَعْدَ الْمَوْتِ رَجُلٌ مَاتَ مُرَابِطًا فِي سَبِيلِ اللهِ وَرَجُلٌ عَلَّمَ عِلْمًا فَأَجْرُهُ يَجْرِي عَلَيْهِ مَا عَمِلَ بِهِ وَرَجُلٌ أَجْرَى صَدَقَةً فَأَجْرُهَا يَجْرِي عَلَيْهِ مَا جَرَتْ عَلَيْهِمْ وَرَجُلٌ تَرَكَ وَلَدًا صَالِحًا يَدْعُو لَهُ