|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 22 Apr 2014 03:50 PM |
@OP if your trying to make a character move(not NPC), then yeah, no |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2014 03:50 PM |
Never knew about :MoveTo()... :o
~masterCameron101, advanced Lua programmer, certified graphics designer and geek~ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 22 Apr 2014 04:24 PM |
Bump.
crush, kill, destroy, swag |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2014 05:00 PM |
Bump.
crush, kill, destroy, swag |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 22 Apr 2014 06:09 PM |
| I just change the CFrame. Wait, you say models? Can you rotate models, too? o.O |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|