Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
| |
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 23 Dec 2012 01:10 AM |
| print(game.Workspace["ObjectName"].Position) |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 23 Dec 2012 01:11 AM |
| No, that would be getting the object's position, not finding an object by a certain position. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 23 Dec 2012 01:12 AM |
Oh!
c = game.Workspace:GetChildren() for i =1,#c do if c[i]:IsA("Part") and (c[i].Position = Vector3.new(0,0,0)) then print("yolo") end end
|
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 23 Dec 2012 01:13 AM |
c = game.Workspace:GetChildren() for i =1,#c do if c[i]:IsA("Part") and (c[i].Position == Vector3.new(0,0,0)) then print("yolo") end end |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 23 Dec 2012 01:18 AM |
| Well, in my game it will be checked as often as a second.. looping through potentially ten thousand bricks will cause a lot of lag.. I'm hoping for a more efficient solution. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
|
| 23 Dec 2012 01:22 AM |
| use whatever that method is that came out when raycasting came out. the one that finds all parts in a certain area. its in workspace. too lazy to look at the wiki. it probably does the same thing as above, but its c-side so its faster. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 23 Dec 2012 01:23 AM |
FindPartsInRegion3? and yay you're here. don't leave us. |
|
|
| Report Abuse |
|
|
|
| 23 Dec 2012 01:24 AM |
yeah that one i think
and im not here. its all your imagination. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
| |
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 23 Dec 2012 01:38 AM |
02:36:04 - Workspace.Script:5: ambiguous syntax (function call x new statement) near '('
5 local hit1 = game.Workspace:FindPartsOnRegion3(Region3.new(brick.Position + Vector3.new(brick.Size.x, 0, 0), brick.Position + Vector3.new(brick.Size.x, 0, 0))) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 23 Dec 2012 01:50 AM |
FindPartsInRegion3.
Not FindPartsOnRegion3 |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 23 Dec 2012 01:52 AM |
Oh, that's one of my problems. I think I can do the rest. Thanks. |
|
|
| Report Abuse |
|
|
| |
|