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

Move To Isn't Moving Humanoid?

Asked by 5 years ago

I was testing out Path Finding Service, and make the dummy get past a maze, I used this code:

01local PathFind = game:GetService("PathfindingService")
02local path = PathFind:CreatePath()
03local humanoid = script.Parent
04path:ComputeAsync(game.Workspace.Maze.Start.Position,  game.Workspace.Maze.End.Position)
05local wayPoints = path:GetWaypoints()
06for i, waypoint in pairs(wayPoints) do
07    local part =  Instance.new("Part", game.Workspace)
08    part.Position = waypoint.Position
09    part.Shape = "Ball"
10    part.BrickColor = BrickColor.new("Institutional white")
11    part.Material = Enum.Material.Neon
12    part.Size = Vector3.new(1,1,1)
13    part.Anchored = true
14    part.CanCollide = false
15    humanoid:MoveTo(waypoint.Position)
16    humanoid.MoveToFinished:Wait()
17end

but the dummy didn't move, and there's no errors. Please help

1 answer

Log in to vote
0
Answered by 5 years ago

I can't believe how simple it was, all I had to do is unanchor the Humanoid Root Part

Ad

Answer this question