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 » Roblox » Suggestions & Ideas
Home Search
 

Re: Rays Ignore Classnames too

Previous Thread :: Next Thread 
rosenburger is not online. rosenburger
Joined: 03 Aug 2009
Total Posts: 8407
04 Jan 2014 10:37 PM
Create another arguments on :FindPartOnRay and :FindPartOnRayWithIgnoreList that has classname(s) to ignore. It will be much more efficient when making guns so that they ignore hats and tools and various other things that would be in the way that shouldn't matter.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
04 Jan 2014 11:12 PM
You can easily script around that.

local IgnoreList = {}

function collectClass(obj, class)
for k,v in pairs(obj:GetChildren()) do
if v:IsA(class) then
table.insert(IgnoreList, v)
end
if #v:GetChildren() > 0 then
collectClass(v, class)
end
end
end

collectClass(workspace, "Hat")
collectClass(workspace, "Tool")

There you go, a class-based ignore list.

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
schmidty1998 is not online. schmidty1998
Joined: 19 May 2010
Total Posts: 322
06 Jan 2014 11:38 PM
It would be nice, though.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Jan 2014 01:15 AM
What would be nicer:

FindPartOnRayWithIgnoreFunction

Might not be as fast, due to it using a Lua function, but it would be useful.
Report Abuse
AsiFeathers is not online. AsiFeathers
Joined: 21 Jun 2012
Total Posts: 252
07 Jan 2014 03:07 AM
They're right, it could become very useful.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Suggestions & Ideas
   
 
   
  • 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