generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Club Houses » ROBLOX Talk
Home Search
 

Re: how do i find the nearest object?

Previous Thread :: Next Thread 
1Ra is not online. 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 is not online. 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 is not online. Thilon
Joined: 05 Apr 2008
Total Posts: 21791
12 Aug 2011 08:48 AM
Scripting Helpers, please.
Report Abuse
boa663 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » ROBLOX Talk
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image