In a comedy, stuff like sex and violence and drugs and kink and crime are tolerated at different levels than they are in dramas and genre. That’s tone.
Messing with tone is a lot of fun, you can mash up horror and comedy and get something fun or bitingly dark or satiric, depending on where you set the slider bars.
Working out on the edge of tone is tricky, and falling off the wire makes your work unintentionally absurd. This pops out often in scripts that cross the line in an effort to establish how (fill in adjective) a character really is without paying attention to how that behavior fits into the bigger picture.
Real life example: many years ago I read a script that proved its bad guy was a bad guy by featuring him slowly crushing some small animals with his foot. It was a total tone buster. It made no sense, in context. Also, it’s completely tone deaf to what audiences tolerate. If anyone remembers What Just Happened?, harming animals is a big ask in a dramatic tone.
In a comedy, you could Farrelly Brothers that fuzzy-smashing into a legitimate laugh because it is over the top, not to mention beyond the pale. It’s a startling transgression of a taboo, which in a comedy is hilarious.
Respect your tone. It is responsible for creating the possibility of suspension of disbelief.