generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: NPC MoveTo

Previous Thread :: Next Thread 
Ytre12345 is not online. 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 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 06:20 AM
Bump
Report Abuse
Ytre12345 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 06:27 AM
Do none of you know? D:
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
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 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 06:32 AM
Sadly, it doesn't work.
Report Abuse
Ytre12345 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 06:39 AM
Buuump pls help D:
Report Abuse
Ytre12345 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 06:52 AM
Why is this so hard D:
Report Abuse
Ytre12345 is not online. 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 is not online. Ytre12345
Joined: 25 May 2012
Total Posts: 31
24 Jun 2014 07:33 AM
Buuump
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
24 Jun 2014 09:17 AM
MoveTo should work..
Report Abuse
databrain is not online. 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
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
24 Jun 2014 09:23 AM
workspace.NPC.Humanoid:MoveTo(Vector3 Position)
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
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 is not online. 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
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
24 Jun 2014 09:43 AM
Still nowhere close to the posters being idiots, choose your words wisely next time.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
24 Jun 2014 09:44 AM
Dueling whats your problem with people on this subforum
Report Abuse
Ytre12345 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image