Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 06:04 AM |
| Hi, i dont really understand how i would make a "NPC" model walk to another part. I've tested it alot, sometimes the model doesnt even move and sometimes everything but the torso gets removed somehow... What i would like is a script that makes my model "NPC" walk to a part and then to another part and loop that motion. |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
|
| 24 Jun 2014 06:28 AM |
oh hey I heard there's a wiki.roblox.com and I heard there's a method called moveto that works on humanoids |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 07:00 AM |
| What i'd like to do is take the model NPC and make it walk to a part, can someone help me please? |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
| |
|
| |
|
databrain
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 3342 |
|
|
| 24 Jun 2014 09:20 AM |
Sorry about the unhelpful idiots who were here earlier.
The method :MoveTo(Vector3 position) inside Humanoid should move the NPC to the given position at its Walkspeed.
If this isn't working for you, it seems your problem is not your scripting understanding, but rather your setup.
Are you sure all your motors/welds on the NPC are connected right? And are you sure that all parts inside the NPC are not Anchored?
It cannot move while it's Anchored. |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2014 09:23 AM |
| workspace.NPC.Humanoid:MoveTo(Vector3 Position) |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2014 09:38 AM |
"Sorry about the unhelpful idiots who were here earlier."
You posted the same thing I did dumbass |
|
|
| Report Abuse |
|
|
databrain
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 3342 |
|
|
| 24 Jun 2014 09:40 AM |
You gave him the wiki link and told him about the MoveTo method that he ALREADY knows.
I told him what his problem was and how to fix it. |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2014 09:43 AM |
| Still nowhere close to the posters being idiots, choose your words wisely next time. |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2014 09:44 AM |
| Dueling whats your problem with people on this subforum |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 10:05 AM |
| When using the MoveTo method will it actually walk with an animation or just teleport there? Also, is there something called "WalkTo"? |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2014 10:10 AM |
| There's something called WalkToPoint, but it doesn't do anything as far as I know. |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 10:15 AM |
Ok the script i have right now is:
wait(3) Workspace.NPC.Humanoid:MoveTo(Vector3.new(100, 0, 0)) wait(8) Workspace.NPC.Humanoid:MoveTo(Vector3.new(0, 0, 0))
I put it inside the model called "NPC" and it works. But it doesn't do any walking animation, how do i make it walk? And how would i make it loop so it walks back and forth? |
|
|
| Report Abuse |
|
|
Locky2013
|
  |
| Joined: 14 Feb 2012 |
| Total Posts: 2401 |
|
|
| 24 Jun 2014 10:16 AM |
| afaik, you cannot add the default ROBLOX animation to a NPC without customizing it to work with the NPC |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 10:20 AM |
| Hmm, cause right now it just slides on the floor to the given coordinates. Is there a way to give it a free animation thats similar to the default walking animation? |
|
|
| Report Abuse |
|
|
databrain
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 3342 |
|
|
| 24 Jun 2014 10:26 AM |
The Animation script can be found inside your character.
Go to Test -> Start Server and Players to start up a server. (OR Tools -> Test -> Start Server then Start Player if you use mac)
Then, inside the server window, once the player joins, set Archivable on the player's character to true, and then open it up and find the animation script, and copy it from there. |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 10:43 AM |
| Im impressed by myself, i got some animations working. Now i just need to know how do i loop the script that makes the NPC move? |
|
|
| Report Abuse |
|
|
databrain
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 3342 |
|
|
| 24 Jun 2014 11:31 AM |
while true do wait(1) move(somewhere) wait(2) move(somewhere else) end |
|
|
| Report Abuse |
|
|
Ytre12345
|
  |
| Joined: 25 May 2012 |
| Total Posts: 31 |
|
|
| 24 Jun 2014 11:55 AM |
| Got it, that's awesome! All i want to know now is how do i put two parts together so that they become one? |
|
|
| Report Abuse |
|
|