1Ra
|
  |
| Joined: 02 May 2010 |
| Total Posts: 2400 |
|
|
| 12 Aug 2011 08:51 AM |
lets say i have a zombie, and out of a group in workspace i have to find the closest part in it,
so i can use a for loop to get all the parts then .Magnitude to judge distance,
but how can i compare closest? without having to indivually checking every part?
mabye for i,v in pairs (game.Workspace.Paths:GetChildren()) do if (zombie.torso.Position - v.Position).Magnitude <=
i need help finishing that.
mabye if i used region3, but how can i get it like, the center of the region is the zombies torso
|
|
|
| Report Abuse |
|