Zach Braff and Taylor Bagley Split

The actor, currently starring inBullets Over Broadway, and model Taylor Bagley have ended their five-year relationship, Braff's rep confirms to PEOPLE.

"Zach and Taylor broke up over a month ago," says his rep. "They are continuing their friendship but are no longer a couple."

The former Scrubs star, 39, and Bagley broke up shortly before the April 10 opening of his Broadway musical.

"The idea of marriage didn't play a factor into their split at all," says a source, adding that the timing was coincidental: "Zach has been a musical theater geek his whole life. This has been everything he's ever wanted."

Braff's rep says the actor has been attached to the play and involved with its development for more than two years. "He chose to do it because it has been a lifelong dream of his to be a part of a Broadway musical," the rep adds.

After he and Bagley went public with their romance, Braff told PEOPLE the best part of his relationship was "having a best friend to do all sorts of fun things with." The actor was previously linked to singer and actress Mandy Moore.

Braff's upcoming film, Wish I Was Here, which he wrote, directed and stars in alongside Kate Hudson, premiered at Sundance this year. It opens in theaters on July 18.