How To Make NPCS Walk Around My Village

How would I make it where npcs can walk around my village? I want to use the path making service to make the npc to go to one point then to another

1 Like

Please provide more details, and how you want to achieve this.

1 Like

You arent really giving enough information but you could just make a loop script that uses :MoveToPart in the NPCs humanoid to move them to different locations :man_shrugging:

This article on the Dev Hub may help you.

@R0bl0x10501050

I don’t actually know, but I think it may have something to do with tweening. There are a couple videos on youtube on how to make your own animations (walking animations) which you caN add, and then you can add a tweening thing…

I’m not sure though ,as i’ve only been scripting for a month or so.

Try searching up how on youtube.

Also, you may want to have a try yourself first and include the script so people can correct it instead of giving you a full script.

I believe you could use a randomizer if you really want roaming villagers. Just a :MoveTo() and Vector3 randomizing.

1 Like

so this is my current script

local humanoid = script.Parent.Humanoid
local body = script.Parent:FindFirstChild("HumanoidRootPart") or script.Parent:FindFirstChild("Torso")
local Point1 = game.Workspace.Point1.Position

local path = pathfindingService:CreatePath()

path:ComputeAsync(body.Position, Point1)

local waypoints = path:GetWaypoints()

for k, waypoint in pairs(waypoints) do
	humanoid:MoveTo(waypoint.Position)

	if waypoint.Action == Enum.PathWaypointAction.Jump then
		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	end

	humanoid.MoveToFinished:Wait()

I just wanted to know how to make it move to a 2nd point after it reaches the first

If you really want to randomize it, like how crops grow in Minecraft, you can do a similar thing. You can create random ticks in Lua.