LOBOT44
|
  |
| Joined: 03 Feb 2010 |
| Total Posts: 23539 |
|
|
| 14 Jul 2012 04:01 PM |
while true do wait(0.1) local target = findNearestTorso(script.Parent.Torso.Position) if target ~= nil then script.Parent.Humanoid:MoveTo(target.Position, target) end end
|
|
|
| Report Abuse |
|
|
|
| 14 Jul 2012 04:02 PM |
| As long as you have declared you findNearestTorso function... |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 14 Jul 2012 04:02 PM |
| Yeah, but it will be very close to them or inside them. |
|
|
| Report Abuse |
|
|
LOBOT44
|
  |
| Joined: 03 Feb 2010 |
| Total Posts: 23539 |
|
| |
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 14 Jul 2012 04:07 PM |
You write a function and fill in the code...?
function findNearestTorso(...arguments...) ...some code here... end |
|
|
| Report Abuse |
|
|
LOBOT44
|
  |
| Joined: 03 Feb 2010 |
| Total Posts: 23539 |
|
|
| 14 Jul 2012 04:10 PM |
function findNearestTorso(Position,MoveTo) while true do wait(0.1) local target = findNearestTorso(script.Parent.Torso.Position) if target ~= nil then script.Parent.Humanoid:MoveTo(target.Position, target) end end end
|
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 14 Jul 2012 04:13 PM |
| No, you didn't write any code to find the nearest torso. |
|
|
| Report Abuse |
|
|
LOBOT44
|
  |
| Joined: 03 Feb 2010 |
| Total Posts: 23539 |
|
|
| 14 Jul 2012 04:14 PM |
| wl, heck with this. i'll just go to free models. |
|
|
| Report Abuse |
|
|