He was 56 years old.
Lloyd's TV career included roles in "Desperate Housewives", "Seinfeld", "Modern Family", "The West Wing", "Cougar Town", "Malcolm in the Middle" and "Shameless" according to his agent. He also appeared in the films "Flubber" and "Galaxy Quest."
His co-actors paid tribute to him on social media Friday night.
"Rest in peace to one of the funniest actors I've ever had the pleasure of working with," tweeted actor Zach Braff. "Sam Lloyd made me look up and break character every single time we did a scene together. He couldn't have been a kinder man. I will always cherish the time I had with you, Sammy."
"Scrubs" creator Bill Lawrence described him as a "kind, sweet guy" who will be missed by many.
Lloyd was also a musician. He sang in an a cappella group The Blanks, and played bass guitar in a band called The Butties.