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: Proximity Script Halp?

Previous Thread :: Next Thread 
wargarkaztestplace is not online. wargarkaztestplace
Joined: 05 Oct 2009
Total Posts: 2852
27 May 2012 03:50 PM
So im wondering what would be an efficent way of detecting if a part is near another


say i wanted to make a gun , where when you are near a Crate of ammo , a gui apears saying "Press E to pick up ammo"


I tought of "GetChildren" The whole workspace and keep detecting if its near , but thats kinda laggy


I dont want OnTouch



I heard of some "PartNearRegion" thing or whatever , what is that , how do you use it?
Report Abuse
wargarkaztestplace is not online. wargarkaztestplace
Joined: 05 Oct 2009
Total Posts: 2852
27 May 2012 04:14 PM
Bump
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
27 May 2012 04:16 PM
so you f5ing now? go away!
Report Abuse
wargarkaztestplace is not online. wargarkaztestplace
Joined: 05 Oct 2009
Total Posts: 2852
27 May 2012 04:19 PM
Just trying to have a star near the post so its a bit more visible.
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
27 May 2012 04:20 PM
-.-'

Thats spawming, and people here dont like it.
Report Abuse
Moolah101 is not online. Moolah101
Joined: 22 Sep 2010
Total Posts: 614
27 May 2012 04:22 PM
Well, its not spamming...

Besides it got me going to it lol.
Report Abuse
wargarkaztestplace is not online. wargarkaztestplace
Joined: 05 Oct 2009
Total Posts: 2852
27 May 2012 05:01 PM
"people here"

you got a couple posts and joined 2012

who r u anyway
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
27 May 2012 05:10 PM
So, a loop would be a great way

for i, v in pairs(game.Players:GetChildren()) do
if (script.Parent.Position-v.Character.Torso.Position).magnitude < 25 then
-- gui
end
end


- ogm i r no nob y u noob
Report Abuse
wargarkaztestplace is not online. wargarkaztestplace
Joined: 05 Oct 2009
Total Posts: 2852
28 May 2012 12:33 AM
I asked if theres another way other than GetChildren

and you show me a GetChildren script

i dont want one that scans the whole workspace every 0.1 second

Because the script is in the player , not in the ammo box
Report Abuse
eletr0wiz is not online. eletr0wiz
Joined: 02 Mar 2010
Total Posts: 138
28 May 2012 12:37 AM
Right now that is impossible as no scripts can access the mouse movement without tools or hopperbins...
However roblox talks about adding this in the future...
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