Something upsetting happened behind the scenes ofScrubsseason 4, and it affected the show’s main character in ways that wouldn’t have happened otherwise. The episode that ensued as a result of said occurrence is arguably one ofScrubs' saddest episodes. Having said that, the medical sitcom still manages to do what it does best and drags out elements of humor and inspiration from the emotional turmoil. While it directly affectsZach Braff’s Dr. John “JD” Dorian, it also influences one of his Sacred Heart colleagues and how they interact with him for the rest of the show’s run.
All nine seasons ofScrubswere riddled with guest stars, although most of the temporary cast members in the show’s divisive final run were just members of the original cast. The frequency at which these guest stars returned varied a great deal. Some would come back again and again, whereas others only appeared in a single installment. In one case, the latter was true, but the former had been the intention.

John Ritter Was Supposed To Be A Recurring Guest In Scrubs As JD’s Dad
Sam Dorian appeared in just 2 episodes
In 2002,comedy legend John Ritter made hisScrubsdebut as JD’s dad, Sam Dorian, inScrubsseason 1, episode 19, “My Old Man.” He briefly reprised the role inScrubsseason 2, episode 9, “My Lucky Day,” in a flashback to JD’s youth. Sadly, Ritter’s death in 2003 meant these two performances as Sam would be the extent of his direct contributions to theScrubsuniverse. The actor was intended to return to the show on a semi-regular basis, but this wasn’t possible due to his passing.
Scrubsseason 4, episode 6, “My Cake,” was written to account for Ritter’s death, as it also addressed the passing of Sam Dorian within the world of the show.

Scrubsseason 4, episode 6, “My Cake,” was written to account for Ritter’s death, as it also addressed the passing of Sam Dorian within the world of the show. The episode had already been written, but Ritter died days before it was planned to be shot. On the officialScrubsrewatch podcast,Fake Doctors, Real Friends, Braff declared that “the writers had to scramble to rewrite the episode for Tom Cavenaugh.“Cavenaugh returns as Dan Dorian and becomes the relative who visits JD, and it’s with very sad news, instead of the episode being a catch-up between father and son.
Scrubs started to enhance Dr. Cox’s role as JD’s surrogate father
By JD’s own admission, his father wasn’t terrible, but he was a little distant and tried to mask a lot of his emotional shortcomings with comedy. However, they had started to cover some important ground in “My Old Man,” so Sam’s death interrupted that reconnection after years of stilted and hollow conversations. Short of a father figure,JD started to subconsciously gravitate more to John C. McGinely’s Dr. Coxto fill that void.
Michael J. Fox’s Scrubs Season 3 Episodes Created A Hilarious Problem For The Show
Michael J. Fox was a huge casting for the medical sitcom, but the show’s writers had to accommodate for a funny issue created by the actor’s presence.
Before Sam’s passing, JD and Dr. Cox had far more of a student/teacher relationship. There were elements of surrogate fatherhood there, but they weren’t nearly as prominent as they became when JD lost his father. The moments when Dr. Cox would drop his guard around JD started to become more and more common, and Braff’s character relished those moments to connect with his mentor and replacement dad. This shift is immediately detectable whenCox steps up to be there for JD in “My Cake,“despite McGinley’s character being hugely uncomfortable with vulnerable moments.

JD & Dr. Cox’s Father/Son Dynamic Was One Of The Best Things About Scrubs
There are several great character pairings inScrubs, but watching JD and Dr. Cox grow into their father/son dynamic is one of the show’s most rewarding and slow-building arcs. It’s impossible to know now whether this storyline would have happened in the same way if John Ritter had continued to be part of the cast. Even if their relationship had become more than just student and teacher, it may never have come anywhere close to what it turned into in the wake of Sam Dorian’s death.
Without Braff’s character’s endless attempts to connect with his mentor, the show wouldn’t have been the same.
So, althoughRitter’s passing wasn’t what anyone expected or wanted,Scrubsstill managed to salvage the best of a bad situation and channel all that emotion into the ever-growing bond between JD and Dr. Cox. Without Braff’s character’s endless attempts to connect with his mentor, the show wouldn’t have been the same. Similarly, witnessing Dr. Cox gradually becoming the father that JD so needed and craved became impossible not to love.Scrubs' planned arc for JD and his real dad may have been similar, but it wouldn’t have been a beat-for-beat comparison.