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

How do I make the localplayer walk in a path?

Asked by 3 years ago

I've been searching the wiki and tutorials, but I cannot find anywhere how to make the local player walk a path or to a vector without using the keyboard. How would I go about doing this? I know the "MoveTo" function is for NPCs, but this is similar to what I want the local player to do.

1 answer

Log in to vote
0
Answered by
rabbi99 714 Moderation Voter
3 years ago

It is really easy! There is a property in the Humanoid called WalkToPoint. If you change this value through a serverscript, the player will walk in a straight line to that point.

Example:

character = game.Workspace:WaitForChild("rabbi99")

function walktopoint(position)
    character.Humanoid.WalkToPoint = position

end

walktopoint(Vector3.new(--Your desired position here)) 
0
So this seemed to work for me, although my friend joined and it doesn't work for him? FizzyFlame 42 — 3y
Ad

Answer this question