Pathfinding system

This is a repost, original one is getting old now and no one responds anymore

DISCLAIMER: I am NOT asking for scripts

so, let’s say there are grids and a soldier

and I wanted to make the soldier walk into the selected grid

but I wanted to make the soldier walk like this

I don’t want to use the Roblox’s standard PathfindingService since there are no obstacles in the area

how would I achieve this?
any useful links?

any helps are appreciated, as always :slight_smile:

1 Like

https://developer.roblox.com/en-us/api-reference/function/Humanoid/MoveTo

the easiest way to achieve this is by just using the MoveTo function. You would move the soldiers humanoid to a part and have it wait for how ever long u want then just move it again from that position.

To achieve this you could probably tell it to only move to one axis of the part, and then after tell it to move towards the next axis such as

Destination = Vector3.new(50,0,50)
LocalPlayer = Players.Localplayer
Char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
Hum = Char:WaitForChild("Humanoid")
HUMRP = Char:WaitForChild("HumanoidRootPart")
Repeat 
     Hum:MoveTo(Destination.X)
Until HUMRP == Destination.X

Repeat 
     Hum:MoveTo(Destination.Z)
Until HUMRP == Destination.Z

There really isnt an easy way to create your own pathfinder, as its simply not efficient and a waste of time, this script will most likely achieve your goal it will travel at a 90 degree angle

bro your code is… but I can fix that, thanks