|
| 16 Sep 2013 08:16 PM |
local touching = false local part = nil local capPre = nil --capturing precent local pos1 = Vector3.new(368.5, -26.4, -1334.5) local pos2 = Vector3.new(417.5, -44.4, -1391.5)
while wait(1) do local region = Region3.new(pos1, pos2) local parts = game.Workspace:FindPartsInRegion3(region, 200) for i = 1, #parts do print(parts[i].Name) end end
got this in output 21:16:07.848 - Unable to cast value to Object |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:18 PM |
That's not a weird error if you know what classes and objects are. I'm not familiar with :FindPartsInRegion(), sorry.
~Professional ROBLOX Human |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:18 PM |
"I'm not familiar with :FindPartsInRegion(), sorry."
Then why post? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:19 PM |
"Unable to cast a value to an object"
Casting a value is like tostring() and tonumber(). I can't explain objects within 1 sentence, sorry.
~Professional ROBLOX Human |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Sep 2013 08:20 PM |
@Pokemon,
I was supplying more help in a second post, I forgot to add in the first post.
~Professional ROBLOX Human |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:22 PM |
| SO, again, what am I doing wrong? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:22 PM |
What is region?
~Professional ROBLOX Human |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:23 PM |
| According to the Object Browser/Wiki the second argument should be an Instance that has all of it's decendants ignored (not included in the returned table). Also, the max parts the method returns is 100. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:24 PM |
" second argument should be an Instance that has all of it's decendants ignored"
Not sure what this means.. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:25 PM |
| It should be an object, like a model, not a number. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 16 Sep 2013 08:45 PM |
I tried this
local touching = false local part = nil local capPre = nil --capturing precent local pos1 = Vector3.new(368.5, -26.4, -1334.5) local pos2 = Vector3.new(417.5, -44.4, -1391.5)
while wait(0.3) do local region = Region3.new(pos1, pos2) local parts = game.Workspace:FindPartsInRegion3(region, nil, 100) for i = 1, #parts do print(parts[i].Name) end end
but it doesnt print anything |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:47 PM |
ocal touching = false local part = nil local capPre = nil --capturing precent local pos1 = Vector3.new(368.5, -26.4, -1334.5) local pos2 = Vector3.new(417.5, -44.4, -1391.5)
while wait(0.3) do
local region = Region3.new(pos1, pos2) local parts = game.Workspace:FindPartsInRegion3(region, nil, 100) print(#parts) for i = 1, #parts do print(parts[i].Name) end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 16 Sep 2013 09:04 PM |
| You set the Vector3's for the Region3 wrong b/c it's saying that there aren't any parts within the Region3. That or something I'm not seeing. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:05 PM |
| I have 2 bricks where I got the position from. there is about 10 parts in there |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:07 PM |
| I even tried another position but it still wont work |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:12 PM |
local touching = false local part = nil local capPre = nil --capturing precent local pos1 = Vector3.new(368.5, -44.4, -1391.5) local pos2 = Vector3.new(417.5, -26.4, -1334.5)
while wait(0.3) do
local region = Region3.new(pos1, pos2) local parts = game.Workspace:FindPartsInRegion3(region, nil, 100) print(#parts) for i = 1, #parts do print(parts[i].Name) end end |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:14 PM |
I even made a script that puts 2 parts at the positions. still nothing
i am `100% sure the positions are correct |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:16 PM |
| it works now.. what did you do? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 09:21 PM |
| i cant seem to find what you changed. what did you do to make it work? |
|
|
| Report Abuse |
|
|