|
| 26 Jun 2014 07:40 PM |
All I changed was the values. Now it doesn't work right...
function IsInRange(part, size, position) local Rl = position - part.Position if math.abs(Rl.X) <= size.X and math.abs(Rl.Y) <= size.Y and math.abs(Rl.Z)<= size.Z then return true else return false end end
I'm using it in my place part tool. It doesn't restrict them properly now -_-
Help? |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 07:49 PM |
What are you trying to do?
-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::] |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 08:02 PM |
| It is supposed to check if part is in a 3D location in space. The size is how big the 3D location is, the position is the position. So basically it checks if 'part' would collide with a part with the size, size and position, position. |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2014 07:32 AM |
| I know it's been a while but I still need this script. Can anybody help? |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 10:50 AM |
YOLO
You Obviously Lack Originality |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 10:55 AM |
function IsInRange(part, size, position) local Rl = position + part.Position if math.abs(Rl.X) == size.X and math.abs(Rl.Y) = size.Y and math.sin(Rl.Y) == size.Z then return true else return false end end
tested and it works u can thank me now |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 11:10 AM |
First of all, there's no way on earth that'll work. See this;
and math.abs(Rl.Y) = size.Y
Yea. Smart move.
Secondly using == will mess it all up.
So yes, thank you, for nothing... |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jul 2014 11:35 AM |
| Answering my question is the key to getting the grateful and kind warspyking back ;D |
|
|
| Report Abuse |
|
|
| |
|