"It was shockingly sexy when I thought it was just going to be a goof, and I was like, 'Oh s—t,'" Bill Lawrence shares.