1Ra
|
  |
| Joined: 02 May 2010 |
| Total Posts: 2400 |
|
|
| 12 Aug 2011 08:46 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. |
|
|
| Report Abuse |
|
|
1Ra
|
  |
| Joined: 02 May 2010 |
| Total Posts: 2400 |
|
|
| 12 Aug 2011 08:48 AM |
| mabye if i used region3, but how can i get it like, the center of the region is the zombies torso? |
|
|
| Report Abuse |
|
|
Thilon
|
  |
| Joined: 05 Apr 2008 |
| Total Posts: 21791 |
|
|
| 12 Aug 2011 08:48 AM |
| Scripting Helpers, please. |
|
|
| Report Abuse |
|
|
boa663
|
  |
| Joined: 18 May 2008 |
| Total Posts: 15965 |
|
|
| 12 Aug 2011 08:49 AM |
| What are you talking about.... AND THIS GOES IN SCRIPTING HELPERS. |
|
|
| Report Abuse |
|
|
Kelvyn10
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4879 |
|
|
| 12 Aug 2011 08:49 AM |
| I'm not exactly sure on humanoid/zombie kind of things, but the Scripting forum may be of some service to you. |
|
|
| Report Abuse |
|
|
KingOptic
|
  |
| Joined: 13 Mar 2011 |
| Total Posts: 1610 |
|
|
| 12 Aug 2011 08:49 AM |
| Did you just try the Script Helpers? If not, you must try to ask them. |
|
|
| Report Abuse |
|
|
1Ra
|
  |
| Joined: 02 May 2010 |
| Total Posts: 2400 |
|
|
| 12 Aug 2011 08:50 AM |
omg i thought i did post there :O
stupid computer >:| |
|
|
| Report Abuse |
|
|