8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
|
| 07 Jul 2012 10:50 PM |
There's no output.. it just does nothing o.O
h = game.Workspace["Test Bot"].Humanoid while true do wait() h:MoveTo(h.Parent.Torso.Position + Vector3.new(0,1,0), workspace.Base) end
|
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 10:51 PM |
h = game.Workscape.Test_Bot.Humanoid I'm pretty sure that will work. ] |
|
|
| Report Abuse |
|
|
8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
|
| 07 Jul 2012 10:53 PM |
| LOL.. UUhm... no.. It's the function that don't work>.< |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 10:57 PM |
h = game.Workspace["Test Bot"].Humanoid h:MoveTo(Vector3.new(h.Parent.Torso.Position) * Vector3.new(0,1,0))
I am pretty sure thats how you do it. If you use this event on a humanoid, you only need to put in the position and it will move the object untill it reaches its destination. No need for while loop :P
|
|
|
| Report Abuse |
|
|
8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
|
| 07 Jul 2012 11:01 PM |
| Lol it's just a chunk from my script, i'm making a bot controller>.< thx i'll see if it works. |
|
|
| Report Abuse |
|
|
8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
|
| 07 Jul 2012 11:06 PM |
Okay it didn't work. This is what it said in output:
Argument 2 missing or nil |
|
|
| Report Abuse |
|
|
8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
| |
|
|
| 07 Jul 2012 11:23 PM |
h = game.Workspace["Test Bot"].Humanoid h:MoveTo(Vector3.new(h.Parent.Torso.Position) + Vector3.new(0,1,0))
Try that? |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 07 Jul 2012 11:26 PM |
In order to move a humanoid like this you need 2 arguments. h = game.Workspace["Test Bot"].Humanoid h:MoveTo(Vector3.new(h.Parent.Torso.Position) + Vector3.new(0,1,0),game.Workspace.Base) Just change the second argument to the part you want to move it to. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 07 Jul 2012 11:28 PM |
A vector3.new takes 3 arguments, hence the Vector'3'. You give it one, which is (h.Parent.Torso.Position) + Vector3.new(0,1,0)) Change that line to: h:MoveTo(Vector3.new((h.Parent.Torso.Position) + Vector3.new(0,1,0), 0, 0)) OR h:MoveTo(Vector3.new((h.Parent.Torso.Position) + Vector3.new(0,1,0), 0, (h.Parent.Torso.Position) + Vector3.new(0,1,0))) |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 07 Jul 2012 11:29 PM |
| @White, Vector3.new takes 3 though o.O |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2012 11:32 PM |
@ White
If you use the :MoveTo method on a humanoid, you only need to put in the position, not the part. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 07 Jul 2012 11:34 PM |
| Nvm. the MoveTo that I was using makes it walk to the part. |
|
|
| Report Abuse |
|
|
8Bawl
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 544 |
|
|
| 07 Jul 2012 11:52 PM |
Okay it kinda works now. But how do I make it KEEP moving, and not just go to the position(0,1.2,0) ._. I have a tool that when you press W it makes the bot move forward.. with the script below.. but it won't KEEP moving, it moves once and stops..
h = script.Parent.Parent.Bot.Value.Humanoid while true do wait() h:MoveTo(Vector3.new(h.Parent.Torso.Position) + Vector3.new(0,1,0),game.Workspace.Base) end
|
|
|
| Report Abuse |
|
|