Dobby's role in the film series is far smaller than in the books, where he made frequent appearances in-between Chamber of Secrets and Deathly Hallows. In the books, we saw more of how kind-hearted and loyal Dobby was, particularly towards Harry Potter, to whom he was indebted for his freedom. But even those who only knew Dobby from The Chamber of Secrets film were probably affected by his sacrifice in The Deathly Hallows Part 1, where he proved crucial in freeing Harry and his friends from a horrific scenario, only to fall victim to Bellatrix Lestrange in the process. The fact that Dobby, in his dying moments, clearly had no regrets about literally giving his all for his friend Harry resulted in one of the most touching moments in the series.