Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Actress Vanessa Hudgens was accused of making insensitive remarks about the coronavirus pandemic in an Instagram video in which she said deaths are "terrible but ... inevitable."

What a horrible and heartless message for you to share with the younger people who look up to you @VanessaHudgens pic.twitter.com/p0vIekdigP — Yashar Ali 🐘 (@yashar) March 17, 2020

"Um, yeah, 'til July sounds like a bunch of bulls---. I'm sorry," Hudgens said Monday of the potential length of the social distancing in the U.S. "It's a virus, I get it. Like, I respect it. But at the same time, like, even if everybody gets it, like, yeah, people are gonna die, which is terrible but, like, inevitable?"

She added in the Instagram Live video: "I don't know. Maybe I shouldn't be doing this right now."

In another Instagram video Tuesday, Hudgens, who has 38.4 million followers, said: "So yesterday I did an Instagram Live, and I realized today that some of my comments are being taken out of context."

"It's a crazy time. It's a crazy, crazy time. And I am at home and in lockdown. And that's what I hope you guys are doing, too, in full quarantine and staying safe and sane. I don't take this situation lightly by any means. I am home. So stay inside, y'all."

She also apologized in a statement on her Twitter account Tuesday afternoon, saying she was "so sorry" for the way she has "offended anyone and everyone" who saw the clip from her Instagram Live on Monday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Full coverage of the coronavirus outbreak

"I realize my words were insensitive and not at all appropriate for the situation our country and the world are in right now," the statement said, adding it has been a "huge" wake-up call about the significance her words have, now more than ever.

"I'm sending safe wishes to everyone to stay safe and healthy during this crazy time," it concluded.

Journalist Yashar Ali was among those to criticize the "High School Musical" actress' remarks.

"What a horrible and heartless message for you to share with the younger people who look up to you," he said in a tweet.

Author Roxane Gay also weighed in, tweeting: "She is like 31... strange. I suppose until It hits home this is not real for many people."

Another Twitter user opined: "The callousness is more of a disease than Covid 19," referring to the disease associated with coronavirus.

The Centers for Disease Control and Prevention recommended Sunday that no gatherings with 50 people or more be held in the U.S. for the next eight weeks. Officials have also ordered the closings of theaters, fitness clubs and bars to slow the spread of the virus.

As of Tuesday afternoon, there were more than 5,000 confirmed cases of coronavirus in the U.S., and at least 96 people had died in the outbreak.

Download the NBC News app for full coverage of the coronavirus outbreak

Hudgens isn't the only celebrity who was slammed this week for content posted on social media about the coronavirus.

Singer Keri Hilson was widely criticized for falsely linking the coronavirus to 5G networks. One of her tweets was retweeted thousands of times by Monday morning, and Hilson was trending.

Unlike Hudgens, Hilson did not appear to backtrack on her since-deleted tweets and Instagram posts. She tweeted later Monday that the content was deleted at the request of her management.