Lea Michele is apologising for alleged past bad behaviour after "Glee" co-star Samantha Maria Ware accused her of tormenting her on the set.

The "Glee" alum admitted that she does not remember the alleged past behavior and said that she "never judged others by their background or colour of their skin." But she added that "that's not really the point" and expressed her sincere apology for allegedly "tormenting" Ware on the set.

"What matters is that I clearly acted in ways which hurt other people. One of the most important lessons of the last few weeks is that we need to take the time to listen and learn about other people's perspectives and any role we have played or anything we can do to help address the injustices that they face," Michele said in a statement shared with People, which she also shared on Instagram.

The soon-to-be-mother then addressed her May 29 tweet in support of Black Lives Matter, which urged Ware to speak up about her experience on the "Glee" set. Michele said her tweet was "meant to be a show of support for our friends and neighbors and communities of color during this really difficult time."

View this post on Instagram

A post shared by Lea Michele (@leamichele) on

However, the responses she received also made her focus specifically on how her "behaviour towards fellow cast members was perceived by them." She expressed her uncertainty if it was her "privileged position and perspective" that caused her to be perceived as "insensitive or inappropriate at times" or whether it was her "immaturity" and "just being unnecessarily difficult."

"I listened to these criticisms and I am learning and while I am very sorry, I will be better in the future from this experience," she said.

Ware, who played Jane Howard on "Glee," replied to Michele's tweet with an accusation that she made her life on the set a "living hell."

Michele said she is sorry for her past bad behaviour and for the pain she caused, although she did not direct her apology to Ware. She revealed that the past couple of months have provided time for her to reflect on her own shortcomings and that she is working to become a better person who takes responsibility for her actions since she wants to be a role model for her child.

Lea Michele
Lea Michele apologises to past bad behaviour on the set of "Glee." David Becker/Getty Images