The 2010 film in which Elon Musk appeared as himself alongside Robert Downey Jr. was Iron Man 2.
Musk has a brief cameo in Iron Man 2, the Marvel Studios sequel released in 2010. In the film, Tony Stark meets Musk at a public event, and Musk mentions an idea for an electric jet.
The appearance connected with public interest in Musk’s technology companies and with the film’s futuristic setting. Director Jon Favreau and actor Robert Downey Jr. had drawn inspiration from aspects of Musk’s public persona when shaping the character of Tony Stark.
Musk has also appeared as himself in television programs and other films, which can cause confusion. His Iron Man 2 appearance is a cameo, not a portrayal of a fictional character and not a starring role.