script.Parent.Humanoid:MoveTo(Target.Value.Character.Torso.Position , Target.Value.Character.Torso)
How can I make it so it only goes say, half way towards the target?
script.Parent.Humanoid:MoveTo(Target.Value.Character.Torso.Position , Target.Value.Character.Torso)
How can I make it so it only goes say, half way towards the target?
The trick is to only make it move towards the midsection. For this I'll use lerp so that you can reasonably change the fraction of the distance it covers.
script.Parent.Humanoid:MoveTo(Target.Value.Character.Torso.Position:lerp(script.Parent.Position, 0.5) , Target.Value.Character.Torso)
I'm not sure whether you want the second argument in this case, but I've kept it because I don't have the context of your application.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
^ when I do that the npc moves with my turns like I turn right and he turns right, is there anyway for him to just follow me at a distance
Yeah that's why I said you probably don't want the second argument. The issue is of course that now you're talking about having a distance restraint which is a totally different ordeal.