|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 07 Jan 2014 03:07 AM |
| They're right, it could become very useful. |
|
|
| Report Abuse |
|
|