The show wasn't actually filmed in New York City.

Sometimes the NYC set was pretty convincing. 20th Century Fox

New York City may be a central character in the series, but according to the New York Post, they really filmed on a studio lot in Los Angeles that was designed to look like the Big Apple.