The actor explained that his guest role on the show involves a romantic storyline.
"I play a bar owner in Montana who has a short fling with Mary-Louise Parker," he told Popeater.
"I actually haven't seen the episode but I've heard from everyone who has that it was one of the most graphic scenes they've had on Weeds. Yeah, so I'm very proud of that."
However, Gosselaar explained that he always picks his parts carefully.
"I don't do anything that I regret later," he said. "There's a line I won't cross and I'm aware of not crossing that line. I don't think there's ever going to be a point in my life where I have to explain to my kids why I did something."
Weeds returns for a new season on August 16 on Showtime.