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 » Scripters
Home Search
 

Re: Tool Range

Previous Thread :: Next Thread 
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
27 May 2015 04:49 PM
How would I go about making a certain tool have to be in range (5-7 studs) of a brick before it can interact with it?
Report Abuse
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
27 May 2015 04:58 PM
bump
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 05:08 PM
.magnitude



-𝒩 | Anticodist, Scripter
Report Abuse
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
27 May 2015 05:10 PM
Thanks. I'll look into it.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 May 2015 05:10 PM
Thanks, you gave me an idea.

Answer as stated is magnitude, which you would check every time someone tried to use the tool. If in range then fire, else don't.
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 05:11 PM
Amanda, I think I know what your idea is... I was working on my 'idea' when I read this. This is why I was able to think so quickly about it xD



-𝒩 | Anticodist, Scripter
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 May 2015 05:12 PM
Nope.
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 05:13 PM
﴾͡๏̯͡๏﴿ O'RLY?



-𝒩 | Anticodist, Scripter
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
27 May 2015 05:20 PM
You mean as in you're using raycasting?
Report Abuse
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
27 May 2015 05:25 PM
I got it to work playing with magnitude and the distance formula

(target.Position - player.Character.Torso.Position).magnitude <= 10

but while using a hopper bin to test it, it changed the curso from the roblox cursor to my regular cursor... I'm not sure if this only happens in studio so I'll give it a shot ingame.
Report Abuse
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
27 May 2015 05:26 PM
As I had thought it only happens in studio.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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