Justin Theroux is devoted to his profession.

And the 45-year-old did not disappoint on Wednesday when one scene for his show - The Leftovers - called for him to throw up.

The actor was spotted vomiting up water outside a car window while filming season three of the HBO series in Melbourne.

Scroll down for video

In character: Justin Theroux was spotted throwing up for one scene of his show The Leftovers

The scene was filmed during a downpour, with Justin poking his head outside a car to spew out water.

The Girl On The Train star has been busy filming the final season of the HBO show in Australia since June.

Justin slipped on white trousers with a matching hued button up shirt, blazer and boots.

The bearded star rounded out his character's look with an off-white tie and a large watch, later adding aviator sunglasses.

Fancy: The 45-year-old looked dapper in a white suit while filming scenes for season three of his TV show The Leftovers

Ready, set, action! The scene was filmed during a downpour, with the actor poking his head outside a car to spew out water

In the drama, the screen actor plays Kevin Garvey, Jr., starring alongside Liv Tyler, Amy Brenneman and Christopher Eccleston.

Justin was also seen on his cell phone during breaks in filming, shielding his eyes with his black tinted sunglasses.

The Wanderlust actor's latest film, The Girl On The Train, is set to hit US theaters on October 7.

In the moment: The Girl On The Train star has been filming the final season of the HBO show in Australia since June

Looking good: The handsome actor paired the all-white look with a heavy beard on Wednesday in Melbourne

He plays Tom Watson in the mystery thriller, starring alongside Emily Blunt, Luke Evans and Edgar Ramirez.

Justin tied the knot with Jennifer Aniston, 47, on August 5, 2015 after getting engaged in 2012.

The lovebirds met on the set of their 2011 film, Wanderlust, and began dating soon after.

Season three of The Leftovers - the final season - is set to premiere in January 2017 on HBO.

Focused: Justin slipped on white trousers with a button up shirt, blazer and boots