He smashes his head on the top of the door frame. Apparently the DVD editors have a sense of humour because they’ve added a distinct “thunk!” sound to the film at that point.
A reference to this gag is also in “Star Wars Episode II: Attack of the Clones.” All storm troopers from the original trilogy are revealed to be clones of Jango Fett.
As Jango Fett boards the Slave I late in the film, he bumps his head in a similar way to the storm trooper in “A New Hope.” Originally entitled “Star Wars”, the movie become known as “Star Wars – A New Hope” after the release of the prequel. The film is one of the highest grossing movies in history and catapulted George Lucas into the public eye.
Fearing that his movie would be a disaster, Lucas fled to Hawaii with his wife in order to escape the backlash. After watching a news report on the hundreds of movie fans patiently lining up to see “Star Wars”, Lucas finally began to realize just how successful his movie had become.