A familiar face from Ted once appeared on It's Always Sunny in Philadelphia — and the role couldn't be more different.