Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make an NPC copy, the players movement?

Asked by 4 years ago

What am trying to make is a clone of the player, and that clone would copy the players movement. For example of the Player goes Left the Clone would also go Left, but i dont want the clone to be too close. Or I would like the clone to do the opposite direction. If player goes left, the clone would go right, but if player walks forward the clone would also walk forward, same goes for backward. I just need an idea on how to start doing that. Ive tried for about 4 hours with no luck.

I cant do something like

CloneHumanoid.MoveDirection = PlayerHumanoid.MoveDirection

1 answer

Log in to vote
0
Answered by 4 years ago

Im not certain that this will work but maybe try this:

playerHumanoid.Running:Connect(function()
    local pos = playerCharacter.HumanoidRootPart.Position

    pos = Vector3.new(pos.X - 5, pos.Y, pos.Z - 5)

    CloneHumanoid:MoveTo(pos)
end)
0
Yeah, but the problem with that, The NPC just follows you. I am trying to make the NPC only follows your movement. Not go where you are then follow it xD xXOusamXx_Stand 0 — 4y
0
i think its got to do something with humanoid.MoveDirection ChrisTheRobloxPlayYT 256 — 4y
Ad

Answer this question