Humanoid:MoveTo() function not working until a long amount of time has passed

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I am trying to get an NPC to move to another NPC using Humanoid:MoveTo().
  2. What is the issue? Include screenshots / videos if possible!
    For some reason, I can’t use Humanoid:MoveTo() until I wait a long amount of time. Nothing afaik is yielding the script.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried Model:MoveTo() however, that teleports the character instead of moving it as if it were walking.

This is the script that I’m using to move the character. All the prints print correctly as shown below.

local BIP = script.Parent.Parent
local unit = game.Workspace.SwordAnimateRig
local unithum = unit:WaitForChild("Humanoid")
local function print(text)
	require(game:GetService("ReplicatedStorage").Modules.ImpPrint)(script.Name, text)
end
local skill1
for i, v in ipairs(BIP:GetDescendants()) do
	if v:IsA("ImageButton") and v.Name == "Skill1" then
		print("Skill 1 button found")
		skill1 = v
	end
end
skill1.MouseButton1Click:Connect(function()
	print("Skill1 clicked!")
	unithum:MoveTo(workspace.R6Target.HumanoidRootPart.Position)
	print(workspace.R6Target.HumanoidRootPart.Position)
	print(unithum.WalkToPoint)
	print(unithum.Parent.HumanoidRootPart.Position)
end)

image

2 Likes