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: Just Move.

Previous Thread :: Next Thread 
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:17 AM
-- Script Broken, Somehow

figure = script.Parent
human = figure.Humanoid

while true do
human:MoveTo(Vector3.new(-2104,6.6,622))
wait(2)
human:MoveTo(Vector3.new(-1852,6.6,624))
wait()
human:MoveTo(Vector3.new(-1851,6.1,800))
wait()
human:MoveTo(Vector3.new(-2106,7.3,798))
wait()
end



Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:20 AM
Bump 1
Report Abuse
TheDoctor4816 is not online. TheDoctor4816
Joined: 08 Feb 2009
Total Posts: 396
17 Aug 2013 09:24 AM
You can't move a humanoid. Change human:MoveTo(blah) to figure:MoveTo(blah)
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:27 AM
he teleports D: i want him to walk
Report Abuse
TheDoctor4816 is not online. TheDoctor4816
Joined: 08 Feb 2009
Total Posts: 396
17 Aug 2013 09:28 AM
Oh I see now.
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:31 AM
Bump 2
Report Abuse
TheDoctor4816 is not online. TheDoctor4816
Joined: 08 Feb 2009
Total Posts: 396
17 Aug 2013 09:32 AM
create parts named Part1, Part2 etc at those cords in workspace.

figure = script.Parent
human = figure.Humanoid

while true do
human:MoveTo(Vector3.new(-2104,6.6,622),game.Workspace.Part1)
wait(2)
human:MoveTo(Vector3.new(-1852,6.6,624),game.Workspace.Part2)
wait()
human:MoveTo(Vector3.new(-1851,6.1,800)game.Workspace.Part3)
wait()
human:MoveTo(Vector3.new(-2106,7.3,798)game.Workspace.Part4)
wait()
end
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:34 AM
thx
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:52 AM
for some reason, he stops half way then goes to the next block
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
17 Aug 2013 09:53 AM
HUMANOID:MoveTo(PART.Position, PART)
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
17 Aug 2013 09:55 AM
Your waits aren't long enough.



figure = script.Parent
human = figure.Humanoid
torso = figure.Torso

while true do
human:MoveTo(Vector3.new(-2104,6.6,622),game.Workspace.Part1)
wait((game.Workspace.Part1.Position - torso.Position).magnitude / human.WalkSpeed)
human:MoveTo(Vector3.new(-1852,6.6,624),game.Workspace.Part2)
wait((game.Workspace.Part2.Position - torso.Position).magnitude / human.WalkSpeed)
human:MoveTo(Vector3.new(-1851,6.1,800)game.Workspace.Part3)
wait((game.Workspace.Part3.Position - torso.Position).magnitude / human.WalkSpeed)
human:MoveTo(Vector3.new(-2106,7.3,798)game.Workspace.Part4)
wait((game.Workspace.Part4.Position - torso.Position).magnitude / human.WalkSpeed)
end



This is assuming WalkSpeed is in studs per second. We take the magnitude (studs) and divide by the speed (studs/sec), which equals time taken to get to that point (sec).
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:55 AM
in the script???
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:56 AM
thx
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
17 Aug 2013 09:58 AM
Hey.

The :MoveTo method of Humanoid is rather simple, and your mistake is probably that after 1/30th of a SECOND, you select a NEW destination for the Humanoid to walk to.

For information on MoveTo (Humanoid related, not Model related), try this link:
http://wiki.roblox.com/index.php/MoveTo_(Method)/humanoid

Also, I suggest using the Terrain object as an anchor, as the 2nd argument doesn't really matters, but is required.


- As, made a custom animation tool. Now I'm too lazy to make any animation ): Aw.
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 09:59 AM
do i need to set the humaniods walkspeed to 15??

to get speed is distance/time right?
to get distance its time*speed :D
Report Abuse
blocksbuild is not online. blocksbuild
Joined: 04 Sep 2012
Total Posts: 65
17 Aug 2013 10:26 AM
Bump 1
Report Abuse
TheDoctor4816 is not online. TheDoctor4816
Joined: 08 Feb 2009
Total Posts: 396
21 Aug 2013 06:41 AM
You can set the walkspeed to whatever you like. I think.
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