Neil Patrick Harris

Neil Patrick Harris apologized Friday for using the word "tranny" during Thursday's Live With Kelly.

After Kelly Ripa and Harris, who is guest-hosting as Live searches for a permanent replacement for Regis Philbin, inhaled sulfer hexafluoride — "helium's evil twin" — during a science experiment, the How I Met Your Mother star joked, "I've never sounded more like a tranny in my life."

Dancing's Derek, Jerry O'Connell, Josh Groban to Guest-Host Live!

"Truly sorry for saying the word 'tranny' on Live this week. Twice! Should have been more thoughtful. Didn't at all mean to offend," he tweeted Friday.

GLAAD accepted Harris' apology, noting, "It's heartening to see a celebrity of Harris' stature recognize and apologize for using the slur in such a timely manner, and for greater media attention being paid to its use."  

Check out a clip of Harris on Live: