I’m trying to achieve how to make an NPC move inside a certain area, now I know how to make it walk randomly or to certain places. But I want it to only walk inside a small area, should I use magnitude/distance so like he returns or stays inside that area or is there a better way to do this.
How are you defining the edges of your area?
In this video’s I use parts to tell the script where to allow the NPC to walk
The script gets the part and saves the cframe and size then destroys the part then it uses the cframe and size to make the NPC walk within a random postion where the part was and you can increase the area by simply resizing the part