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: This WAS working

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
26 Jun 2014 07:49 PM
What are you trying to do?

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 Jun 2014 08:20 AM
Please
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
21 Jul 2014 07:32 AM
I know it's been a while but I still need this script. Can anybody help?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Jul 2014 10:50 AM
YOLO

You
Obviously
Lack
Originality
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
JellyBean40 is not online. JellyBean40
Joined: 26 Sep 2011
Total Posts: 315
22 Jul 2014 11:32 AM
noob y u gotta be so rude
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Jul 2014 11:35 AM
Answering my question is the key to getting the grateful and kind warspyking back ;D
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
25 Jul 2014 08:26 PM
Bump...
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