For some reason, humanoid objects aren’t moving. Even in newly created rigs, the models don’t move, and the WalkToPart doesn’t work either. The model’s HumanoidRootPart is unchanged, and no part of the model is anchored.
Video of me showing the MoveTo and WalkToPart is more than 10 MB so here’s the Google Drive link: Video
Opps I just noticed that I messed up bad there thank you for checking my info! Also, the rigs speed is most already higher than zero I would assume since in his OG post he mentions replacing the rig.
I accidentally deleted the original code, but this should be the exact code re-created. I don’t know if it’s just a problem with my game, though, since in other games the move and move to functions work perfectly fine.
local PathfindingService = game:GetService("PathfindingService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()
local selected = false
function moveToWithPathfinding(humanoid, targetPosition)
local path = PathfindingService:CraatePath()
path: ComputeAsync(humanoid.Parent.FrimaryPart.Position, targetPosition)
if path.Status == Enum. PathStatus.Success then
local waypoints = path:GetWaypoints()
print(#waypoints)
for _, waypoint in ipairs(waypoints) do
humanoid:MoveTo(waypoint.Position)
humanoid.MoveToFinished:Wait()
end
print("Move finished")
else
print("Pathfinding failed")
end
end
mouse.Button1Down:Connect(function()
if selected == false then
selected = true
local target = mouse.Target
if target then
local humanoidRootPart = target.Parent:FindFirstChild("HumanoidRootPart")
local humanoid = target.Parent:FindFirstChild("Humanoid")
if humanoidRootPart and humanoid then
print("HumanoidRootPart found")
local head = humanoidRootPart.Parent:FindFirstChild("Head")
head.SelectionImage.Enabled = true
mouse.Button1Down:Wait()
print("Second part clicked")
head.SelectionImage.Enabled = false
if mouse.Target then
if mouse.Target.Parent:GetAttribute("Type") == "Resource" then
print(mouse.Target.Parent.Name)
local targ = mouse.Target.Parent.PrimaryPart print(targ.Position)
targ.CanCollide = false moveToWithPathfinding(humanoid, targ.Position)
end
end
end
end
selected = false
end
end)