Ansel Elgort tried exploiting his own body for charity--at least for a few hours. The 26-year-old posted an almost fully nude photo on his Instagram Tuesday to try and raise money for Brooklyn for Life!, a nonprofit organization.

Brooklyn for Life! is dedicated to working with local restaurants to provide meals to Brooklyn based hospital staff. According to the GoFundMe page Elgort posted in his bio, 100% of the money raised goes toward this cause.

Elgort’s initial photo showed him standing naked in the shower, with only one hand covering his genitals, Entertainment Weekly reported. He captioned the post by misleading fans into clicking the link in his bio, expecting to find even racier photos of the “Baby Driver” actor, but instead being led to the GoFundMe page.

“Hey guys, I just wanted to say thanks a lot, look how much — everybody’s raised a lot of money,” he said in his Instagram story. “I don’t know how much of this is from, you know, the post, but it seems like a lot of people have been giving in the last few hours so thanks a lot.”

However, because Instagram has a no-nudity policy, Elgort said he was forced to remove the photo, much to his dismay.

“Unfortunately, Instagram told me I gotta take my post down because it’s nudity... so I’m gonna take it down,” he said. He then joked, “Maybe I’ll repost the version that cuts a little higher.”

Elgort removed the racy post and traded it in for a more G-rated video of a sunset.

“Sex sells better than sunsets, plz donate at link in bio,” he wrote in the new caption, indicating his belief that his previous nude picture might have raised more money.

At press time, over $211,500 dollars have been raised towards a $1 million dollar goal.

Elgort apologized if he “offended anybody” with his initial post but said “we did a good thing” in his Instagram story. He then made sure to give credit where credit is due.

“And my dad [photographer Arthur Elgort] took the picture, by the way,” he said. “He was mad and said I need to give him credit.”

Ansel Elgort
Ansel Elgort attends the premiere of his film at Ace Hotel in Los Angeles on June 14, 2017. Getty Images/Alberto E. Rodriguez