My npc don't move for a second

so i made a script that make player go to npc and move around freely, but when i press e, i have to wait a second or to, then when i move it, it stopped moving for some times, anyways how would i fix this?
script:

local Character = script.Parent
local Npc = game.Workspace.Npc



UIS.InputBegan:Connect(function(Key, Chatted)
	if Chatted then
		return
	end

	if Key.KeyCode == Enum.KeyCode.E then
		local Player = game.Players.LocalPlayer
		Player.Character = Npc		
end
end)
1 Like

You’re parenting the Npc to the Character, is there any reason why you’re doing that?

For a more possible way to do this (Depending on how you want to make your Character head to the NPC) You can use the HRP’s CFrame & assign it to the NPC, or you can use the Humanoid:Move() function to make the Character move to the NPC