The Diplodocus is first seen in the film eating with the other herbivorous dinosaurs. When Tyrannosaurus Rex appeared on the scene, like the other dinosaurs, it panics and runs away. After Stegosaurus is defeated, Diplodocus leaves the valley with the other Dinosaurs. Later, it is seen struggling to find food and water. Its final appearance is when it gets stuck in a tar pit and dies of heat exhaustion.
Two Diplodocus were seen only at the beginning of the movie. They, along with three Parasaurolophus, witness a meteor supposed to cause the extinction of dinosaurs pass by the Earth as they continue grazing.
In real life
In real life, Diplodocus lived in the Jurassic Period 150-145 million-years-ago, at the same time as Stegosaurus and Ceratosaurus. Thus, it did not coexist with Triceratops, Parasaurolophus, or Tyrannosaurus Rex, all of which lived in the Campanian-Maastrichtian of the Cretaceous Period 80-66 million-years-ago.