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: Humanoid:MoveTo() not working

Previous Thread :: Next Thread 
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 03:40 PM
part = Instance.new("Part")
game:GetService("Debris"):AddItem(part, 3)
part.CFrame = movehere:FindFirstChild("CValue").Value
part.Anchored = true
part.Transparency = 1
part.CanCollide = false
part.Parent = game.Workspace
script.Parent.Humanoid:MoveTo(movehere.Value, part)

There a lot more before that, but this is where the problem is.
No errors. Just nothing.
Made sure movehere.Value has the right vector3 value stored.
Made sure nothing was anchored.
It just does nothing.

Am I overlooking something?

crush, kill, destroy, swag
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
22 Apr 2014 03:46 PM
There are 2 MoveTo methods, the one that you are using is with the humanoid. What that does is literally make your humanoid walk over to that point. What you are looking for is

Model:MoveTo(vec3 position)

Just replace the actual Moveto() line with
script.Parent:MoveTo(moveHere.Value.p)
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 03:47 PM
I am trying to make my humanoid literally walk to a point.

Not just teleport to it.

crush, kill, destroy, swag
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
22 Apr 2014 03:49 PM
Since movehere is a CFrame value..

Humanoid:MoveTo (movehere.Value.p, part)

Unless its a vector, then idk
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
22 Apr 2014 03:50 PM
@OP
if your trying to make a character move(not NPC), then yeah, no
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 Apr 2014 03:50 PM
Never knew about :MoveTo()... :o

~masterCameron101, advanced Lua programmer, certified graphics designer and geek~
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 03:55 PM
@island
Movehere is a vector3 value with a cframe value child inside it.

If I was giving movehere() a cframe instead of a vector3, I would imagine it would error.

Also Im trying to move a npc, not a player.

crush, kill, destroy, swag
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
22 Apr 2014 03:56 PM
K, im totally lost. .
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 03:58 PM
movehere is a vector3 with the value of the position I want to move to.

It has a child which is a cframe value which is later used in the script to set the rotation of the torso.

The vector3 is derived from the cframe earlier in the script.

crush, kill, destroy, swag
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 04:24 PM
Bump.

crush, kill, destroy, swag
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 05:00 PM
Bump.

crush, kill, destroy, swag
Report Abuse
SupahBoshi64 is not online. SupahBoshi64
Joined: 10 Aug 2010
Total Posts: 63997
22 Apr 2014 05:00 PM
Did you make sure you had everything named correctly?

If so, are you using the part for the humanoid to walk to? If not, make it so it is.

Or you can change 'part' in MoveTo:() to the vector3 value(the actual thing listed as value)

I'm looking at one of my own humanoid chasing scripts and so far this is the only solution I can fine.
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 05:44 PM
Solved the problem.
It would appear roblox doesnt take to kindly to moving to a recently created part.

A little delay between creating and moving fixed the problem.

crush, kill, destroy, swag
Report Abuse
SupahBoshi64 is not online. SupahBoshi64
Joined: 10 Aug 2010
Total Posts: 63997
22 Apr 2014 05:50 PM
Well that actually makes sense, since glitches can happen if you don't use Wait() in between certain functions.
Report Abuse
Sekheret332 is not online. Sekheret332
Joined: 22 Nov 2011
Total Posts: 490
22 Apr 2014 05:59 PM
What is MoveTo()?
Report Abuse
SupahBoshi64 is not online. SupahBoshi64
Joined: 10 Aug 2010
Total Posts: 63997
22 Apr 2014 06:03 PM
@sek
It can be used on models to move them to a desired position, or used on a humanoid to make them walk to a desired position.
Report Abuse
Sekheret332 is not online. Sekheret332
Joined: 22 Nov 2011
Total Posts: 490
22 Apr 2014 06:09 PM
I just change the CFrame. Wait, you say models? Can you rotate models, too? o.O
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 06:15 PM
This is really strange...
It works perfectly in an empty server.

Works about 1/2 the time with someone in the server.
No errors.

As soon as the player leaves, works again.

Sometimes it works regardless.

I have no idea what is happening.

crush, kill, destroy, swag
Report Abuse
OTRainbowDash5000 is not online. OTRainbowDash5000
Joined: 29 Jul 2013
Total Posts: 14883
22 Apr 2014 06:17 PM
Works perfectly on actual roblox servers as well.

Just doesnt like studio launched servers.

crush, kill, destroy, swag
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