|
| 21 Jun 2014 09:51 AM |
For some reason, my Region3 code doesn't seem to be checking anything. It's not even running the print command for anything it finds. Care to take a look? Of course, the called function is missing, but I already know that the problem seems to be in the checking and not my function.
local spring=script.Parent local platform=spring.MainSpring.Platform
local Pos1=platform.Position+Vector3.new(2,1,2) local Pos2=platform.Position+Vector3.new(-2,0.51,-2) local raaa=Region3.new(Pos1,Pos2)
while wait(.3) do checkparts=game.Workspace:FindPartsInRegion3(raaa,script.Parent,20) for i=1,#checkparts do print("Checking " .. checkparts[i].Name) bounce(checkparts[i]) end end
ily bae <33 |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 09:57 AM |
local spring=script.Parent local platform=spring.MainSpring.Platform
local Pos1=platform.Position+Vector3.new(2,1,2) local Pos2=platform.Position+Vector3.new(-2,0.51,-2) local raaa=Region3.new(Pos1,Pos2)
while wait(.3) do for _,v in pairs(game.Workspace:FindPartsInRegion3(raa,script.Parent,20) do print("Checking " .. v.Name) bounce(v) end end
I think that should work. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 09:58 AM |
local spring=script.Parent local platform=spring.MainSpring.Platform
local Pos1=platform.Position+Vector3.new(2,1,2) local Pos2=platform.Position+Vector3.new(-2,0.51,-2) local raaa=Region3.new(Pos1,Pos2)
while wait(.3) do for _,v in pairs(game.Workspace:FindPartsInRegion3(raa,script.Parent,20)) do print("Checking " .. v.Name) bounce(v) end end
I forgot one of the parenthesis |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:03 AM |
for _,v in pairs(game.Workspace:FindPartsInRegion3(raa,spring,20)) do
Argument 1 missing or nil.
ily bae <33 |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:07 AM |
| Forgot to put the last a in raaa in that script, sorry about that. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:13 AM |
Same result as before your changes. No script feedback or printing.
ily bae <33 |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:18 AM |
local spring=script.Parent local platform=spring.MainSpring.Platform
local Pos1=Vector3.new(platform.Position+Vector3.new(2,1,2)) local Pos2=Vector3.new(platform.Position+Vector3.new(-2,0.51,-2)) local raaa=Region3.new(Pos1,Pos2)
while wait(.3) do for _,v in pairs(game.Workspace:FindPartsInRegion3(raaa,script.Parent,20)) do print("Checking " .. v.Name) bounce(v) end end
Try that. I'm not too much of an expert in Region3's so I may not be able to help you if that doesn't work. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:22 AM |
Still not working.
I'm thinking that it's an issue with Pos1 and Pos2, but I don't see how. That should be creating a 'hitbox' of sorts that is 4 studs wide and about half a stud tall just above script.MainSpring.Platform, theoretically. So this is quite the head scratcher.
ily bae <33 |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:30 AM |
local spring=script.Parent local platform=spring.MainSpring.Platform
local Pos1=Vector3.new(platform.Position+Vector3.new(2,1,2)) local Pos2=Vector3.new(platform.Position+Vector3.new(-2,0.51,-2)) local raaa=Region3.new(Pos2,Pos1)
while wait(.3) do for _,v in pairs(game.Workspace:FindPartsInRegion3(raaa,script.Parent,20)) do print("Checking " .. v.Name) bounce(v) end end
I found this quote on the wiki and it gave me the idea to switch your vector 3's around. Not sure it will do anything though:
"The first argument is the lower corner of the bounding box, while the second argument is the upper corner. Note that this means the X,Y and Z for the second argument should all be larger than the first one." |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:34 AM |
It worked... Though, I don't see why, as it should be able to accept any variables in any order, theoretically.
But that aside, thanks~! Now my spring system can actually function :DD
ily bae <33 |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 10:35 AM |
| No problem! Happy to help :) |
|
|
| Report Abuse |
|
|