Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make the localplayer walk in a path?

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

✓ Accepted answer

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)) 

1 comment

0

So this seemed to work for me, although my friend joined and it doesn't work for him?

This discussion is preserved as it was. New answers, comments, and votes are closed.