In Harry Potter and the Goblet of Fire, Robert Pattinson portrays Cedric Diggory, a student from the rival Hogwarts School of Witchcraft and Wizardry. The film follows Harry Potter as he competes in the Triwizard Tournament, a dangerous competition between three magical schools. Cedric plays a significant role in the story, forming a friendship with Harry and ultimately meeting a tragic fate. Robert Pattinson's portrayal of Cedric Diggory showcased his versatility as an actor and helped solidify his place in the film industry.