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 4 years ago

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

local PathFind = game:GetService("PathfindingService")
local path = PathFind:CreatePath()
local humanoid = script.Parent
path:ComputeAsync(game.Workspace.Maze.Start.Position,  game.Workspace.Maze.End.Position)
local wayPoints = path:GetWaypoints()
for i, waypoint in pairs(wayPoints) do
    local part =  Instance.new("Part", game.Workspace)
    part.Position = waypoint.Position
    part.Shape = "Ball"
    part.BrickColor = BrickColor.new("Institutional white")
    part.Material = Enum.Material.Neon
    part.Size = Vector3.new(1,1,1)
    part.Anchored = true
    part.CanCollide = false
    humanoid:MoveTo(waypoint.Position)
    humanoid.MoveToFinished:Wait()
end

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

1 answer

Log in to vote
0
Answered by 4 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