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 » Game Creation and Development » Scripting Helpers
Home Search
 

Re: finding a part if you know its position?

Previous Thread :: Next Thread 
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
04 Mar 2014 05:58 PM
How would you go about this?
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
04 Mar 2014 05:59 PM
for a,v in pairs(workspace:GetChildren()) do
if.v.Position == ksjsjsjsjjsjw
end
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
04 Mar 2014 06:00 PM
Maybe:

part = Instance.new ('Part',Workspace)
part.Position = thatposition

function OnTouch (hit)
print (hit.Name)
part:Destroy ()
end

part.Touched:connect (OnTouch)

That's the way that came to mind (Hai dave :D)
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
04 Mar 2014 06:00 PM
woops @ ipad auto spell check
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
04 Mar 2014 06:01 PM
Pretty bad idea to use .Position == Because the SLIGHTEST ERROR in the position will cause error

Example

VEctor3.new(0, 0, 0.0001) == Vector3.new(0,0,0) -> false

I recommend using

workspace:FindPartsInRegion3
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
04 Mar 2014 06:02 PM
mind has been blown :o
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
04 Mar 2014 06:13 PM
how would I use the region3? and please tell me that can detect any part even if its in a model inside of workspace (instead of it needing to be in workspace it can be in a few models)
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
04 Mar 2014 06:14 PM
it'll work even if in model

http://wiki.roblox.com/index.php?title=FindPartsInRegion3_(Method)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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