This week’s season-two finale of “How I Met Your Father” features the guest star fans have been waiting for since the series was first announced: Neil Patrick Harris, reprising his fan-favourite “How I Met Your Mother” role of Barney Stinson.

The episode’s director, Pamela Fryman, who directed almost every episode of “HIMYM”, credits Harris will all the heavy lifting.

“You write this much and then go, ‘Neil?’ and he fills in the rest,” Fryman told Variety.

READ MORE: ‘Suit Up’ For Neil Patrick Harris Cameo In ‘How I Met Your Father’

In the scene, Sophie (played by Hilary Duff) sneaks away from Robert (John Corbett) when she suspects he may be her father, and literally bumps into Barney.

During their exchange, Barney tells Sophie that he’s abandoned his lothario ways since becoming father to a daughter. In order to keep himself on the straight and narrow, he’s rigged himself up to be electrocuted whenever he says something inappropriate to a woman, allowing Harris to indulge in some hilarious physical comedy.

READ MORE: Hilary Duff Says ‘Goal Is To Collect All’ ‘HIMYM’ Stars After Neil Patrick Harris’ ‘HIMYF’ Cameo (Exclusive)

“I love to go to town on that. I’m a big physical comedy guy,” says Harris of the scene.

“It seemed like a great comedic method to acknowledge Barney’s shortcomings while still staying true to his core person… I thought that was a very smart call because it allowed recognition of the world and humanity and the way one is supposed to behave and yet, it’s still kept — in a comedic way — Barney’s engine is always running and revving. You can’t really stop it. As much as Robin tried, as much as fans might want, Barney’s Barney. That’s how he was designed,” Harris added.

According to Fryman, it was important to illustrate that Barney has changed over the years.

READ MORE: ‘How I Met Your Father’: Neil Patrick Harris Has A Cameo In Hilary Duff’s Show

“‘How I Met Your Mother’ was a while ago. A lot has changed and people grow and but it’s Barney,” she explained. “We have to recognize this character that we’ve loved for so long. It seemed perfect to me.”