Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

MoveDirection doesn't work for Players?

Asked by
Invisum -5
8 years ago

From the wiki: **The following example would cause 'Player1' (in Workspace) to walk forward, towards where their camera is pointing, wait five seconds, and then stop the player. **

 Workspace.Player1.Humanoid:Move(Vector3.new(0, 1, 0), true)
wait(5)
Workspace.Player1.Humanoid:Move(Vector3.new(0, 0, 0), true)

Problem: It works for NPCS but it doesn't work for** players. ** Any solutions?

0
Isn't it MoveTo()? Also, I think using Workspace fails. I think it has to be lowercase workspace or game.Workspace. On the workspace I might be wrong. Anyways, what was the error? User#11440 120 — 8y
0
MoveTo() moves the player to a specific point whereas Move() makes the player move retentively to where their camera is pointing. Also, changing Workspace to workspace doesn't have an effect on the script. Invisum -5 — 8y
0
Ah ha, I'm wrong. Awesome. User#11440 120 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

This is untested but it may work, I don't know if you're supposed to loop set this property or if its set until you disable it yourself but you could set the property WalkToPoint to wherever you're attempting to reach. Otherwise you can try the pathfinding tutorial they have on the wiki and apply that to a character.

0
using the walk to point method would be very inefficient for making a custom control script plus the wiki says that the move method (either on the local player or on the humanoid) should work which apparently it doesn't work for players even if the movement mode is set to scriptable Invisum -5 — 8y
Ad

Answer this question