local player = script.Parent.TargetPlayer.Value
while true do
wait()
distance = 20
if player.Torso.Position - script.Parent.Torso.Position.Magnitude <= distance then
script.Parent.Humanoid:MoveTo(player.Torso.Position)
end
end
this is a pathfind script. i want the npc to follow the player in targetplayervalue. targetplayervalue is an object value. when i play this script in a npc it does not work. how can i fix this? in output the error says Workspace.hhhh.FireScript:5: bad argument #2 to '?' (Vector3 expected, got number)
