Will Arnett will replace Armie Hammer in Taika Waititi’s “Next Goal Wins.”

Hammer’s exit comes after the actor was accused by multiple women of sexual assault. He denies the claims and says any sexual relationships were consensual, but the Los Angeles Police Department has launched an investigation. In the wake of the scandal, Hammer was fired from several films and series, including the Jennifer Lopez rom-com “Shotgun Wedding” and a Paramount Plus show about the behind-the-scenes action on “The Godfather.” Hammer also exited the upcoming Broadway production of “The Minutes.” He will appear in the Agatha Christie adaptation “Death on the Nile,” which opens in February.

“Next Goal Wins” is based on the 2015 documentary of the same name, which follows the true story of Dutch coach Thomas Rongen, who attempts the nearly impossible task of turning the American Samoa soccer team from perennial losers into winners. Waititi also penned the script with Iain Morris. Searchlight Pictures will distribute the film.

Arnett, best known for his work on “Arrested Development,” will portray an executive at the Football Federation American Samoa. He recently reshot Hammer’s scenes. The rest of the cast includes Elizabeth Moss, Oscar Kightley, David Fane, Beulah Koale, Lehi Falepapalangi, Semu Filipo, Uli Latukefu and Angus Sampson.

Arnett’s credits include a guest stint on “30 Rock” as well as roles in “Blades of Glory” and “Semi-Pro.” He’s also been active in voice work, lending his silky baritone to “Despicable Me,” “Monsters vs. Aliens” and, most notably, portraying Batman in the “Lego Movie” franchise.

Arnett is represented by Artists First, CAA and Robert Offer from Sloane, Offer, Weber and Dern. Deadline broke the news that Arnett would replace Hammer.