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
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 674 |
|
| |
|
|
| 27 May 2015 05:08 PM |
.magnitude
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
v3c3
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 674 |
|
|
| 27 May 2015 05:10 PM |
| Thanks. I'll look into it. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
| |
|
|
| 27 May 2015 05:13 PM |
﴾͡๏̯͡๏﴿ O'RLY?
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 05:20 PM |
| You mean as in you're using raycasting? |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 674 |
|
|
| 27 May 2015 05:26 PM |
| As I had thought it only happens in studio. |
|
|
| Report Abuse |
|
|