A disabled man grabbed a knife and brandished it at one of his carers before stabbing a sofa and curtains, a court heard.
The incident happened at Laurel Court in Primrose Hill, which cares for people with mental health and learning difficulties.
David Marshall, a resident at the complex, pleaded guilty to a charge of using threatening behaviour.
Kirklees magistrates heard that the incident happened on November 24 while Marshall was in a communal living area.
He had earlier been out with support worker Nicola Hirst and appeared to become upset about someone else getting attention.
The 39-year-old started swearing and was asked to leave the lounge.
Alex Bozman, prosecuting, said: “He came back in and was holding a black handled kitchen knife which he held out in front of him towards her.
“He said in a loud, aggressive manner: ‘Do you want to f*** with me?’ and then challenged everybody else in the room.
“She was scared about what he was going to do and he started stabbing the arm of the sofa and the curtain.
“Ms Hirst ran from the room and he was shouting things like: ‘She’s going to get it’.”
Other staff persuaded Marshall to hand the knife over and he was taken back to his own room.
He has since agreed to have all knives removed from his room and Ms Hirst will not be involved in his support in the future.
Paul Normandale, mitigating, said that his client suffered from epilepsy and severe learning difficulties.
Marshall’s family were at the time unhappy as they felt there were too many residents at the home and he was not getting the attention he needed.
Efforts are now being made to rehouse him into a smaller complex and he has since seen his GP, the court heard.
Mr Normandale added: “He got upset because he wanted to try and help another inmate and was told to go away.
“He’s picked up a knife but was going to use it upon himself and had no intention of using it against anybody else.
“I accept the young lady must have been terrified.”
Magistrates ordered a full report ahead of Marshall’s sentencing.