Order, Supreme Court, New York County (Milton A. Tingling, *506J.), entered April 6, 2009, which denied defendant’s motion to dismiss the complaint for failure to state a cause of action, unanimously reversed, on the law, without costs, and defendant’s motion granted. The Clerk is directed to enter judgment dismissing the complaint.
Plaintiffs seek to hold defendant (PEGS) liable for a vicious and motiveless knife attack committed by a third person, Derr, against their then 10-month old daughter. At the time of the attack, Derr, who had a history of mental illness, resided in an apartment near plaintiffs’ home that was leased and operated by PEGS pursuant to a contract with the State to provide housing and support services to individuals with a history of mental illness. A prior complaint based on the same attack was dismissed for failure to state a cause of action (Avins v Federation Empl. & Guidance Serv., Inc., 52 AD3d 30 [2008], appeal withdrawn 10 NY3d 955 [2008]). In particular, the negligent supervision claim was dismissed because it lacked allegations that PEGS had authority to prevent Derr from leaving the facility or control his conduct while he was away from the facility, such allegations being necessary to show a duty on the part of PEGS to protect members of the general public, such as plaintiff’s child, from harm caused by a potentially dangerous resident of its facility (id. at 35-36, citing Purdy v Public Adm’r of County of Westchester, 72 NY2d 1, 9 [1988], and Rivera v New York City Health & Hosps. Corp., 191 F Supp 2d 412, 425 [SD NY 2002]). Since the prior complaint was dismissed for failure to state a cause of action without any indication that the dismissal was intended to be with prejudice or on the merits, the doctrine of res judicata does not bar the timely commencement of this action purporting to correct the identified pleading deficiency (see Hodge v Hotel Empls. & Rest. Empls. Union Local 100 of AFL-CIO, 269 AD2d 330 [2000]). The present complaint newly alleges that PEGS knew that Derr had threatened to kill a roommate with a knife but did not investigate the threat and took no other action regarding it; that if PEGS had investigated, it would have learned that Derr stored “a number of non-household, attack-style knives” in his bedroom; and that PEGS did not report Derr’s threat to the police or his mental health providers. Like the prior complaint, however, the present complaint does not allege that PEGS had the ability to confine Derr to the facility or control his conduct while outside the facility, and thus fails to correct the prior pleading deficiency. While Derr’s alleged conduct may have posed a foreseeable risk of harm to members of the general public, ‘6 [f] oreseeability, alone, does not define duty—it merely determines the scope of the duty once it is determined to exist” (Hamilton v Beretta *507U.S.A. Corp., 96 NY2d 222, 232 [2001], citingPulka v Edelman, 40 NY2d 781, 785 [1976]). Assuming, arguendo, that FEGS owed a duty to other residents of its facility to protect them from foreseeable violent conduct of another resident, such duty would not extend to members of the community at large (see Hamilton at 233, citing Waters v New York City Hous. Auth., 69 NY2d 225, 228-231 [1987]). Concur—Mazzarelli, J.P., Sweeny, Catterson, Acosta and Abdus-Salaam, JJ.