Ben Affleck thanks Robin Williams in heartfelt tribute

Actors-writers Matt Damon, left, and Ben Affleck, right, pose with actor Robin Williams with their Oscars they won for "Good Will Hunting" at the 70th Annual Academy Awards on March 23, 1998, in Los Angeles. Damon and Affleck won Best Original Screenplay and Williams won for Best Supporting Actor.

HAL GARB/AFP/Getty Images

Ben Affleck has shared a heartfelt message about the late Robin Williams, saying that he's "heartbroken" over his "Good Will Hunting" co-star's death.

Williams won an Academy Award for his role as therapist Sean Maguire in that 1997 film, which also earned Affleck and Matt Damon an Oscar for co-writing the screenplay and helped launch their careers.

"Thanks chief -- for your friendship and for what you gave the world. Robin had a ton of love in him. He personally did so much for so many people. He made Matt and my dreams come true," Affleck wrote in a Facebook post Tuesday. "What do you owe a guy who does that? Everything."

"May you find peace my friend," he added.

Fans have set up a makeshift memorial at the bench in Boston where Williams delivered a memorable monologue in "Good Will Hunting." Several of his quotes from the film, including "Sorry guys, I went to see about a girl" and "Your move chief," could be seen written in chalk next to the bench.

Williams was found dead Monday after committing suicide at his California home. He was 63.