Attempt to call Vector3 value

I am trying to fix up a pathfinding script I found, but I have come across a hurdle. When I use Humanoid.WalkToPoint with a Position value, it only outputs errors. Any ideas why?

Below is the code sample.

path:ComputeAsync(Root.Position, Closest.Position)

local waypoints = path:GetWaypoints()

for i, waypoint in ipairs(waypoints) do
	Humanoid.WalkToPoint(waypoint.Position)
	print("run")

	if waypoint.Action == Enum.PathWaypointAction.Jump then
		Humanoid.Jump = true
	end

	Humanoid.MoveToFinished:Wait()
end
1 Like

What does the error say?

Also try Humanoid:MoveTo(waypoint.Position)

I already did. That didn’t work. It just stood still. I’ll try it again though.
It stood still again.

Was the error still displayed when you called MoveTo()?

no, not at all. it just stood still.

That’s weird, maybe try setting the walkspeed or something?

The walk speed is 16. It’s always been that way.

Could you try checking if the path is blocked?

It looks for the nearest part from a workspace:GetPartBoundsInRadius(), which is a part in front of it.

turns out there was a very, very simple solution. check if a part’s parent has a humanoid or not

2 Likes