i tryed to find how to do it i tryed lots but it just walks to the edge of the map
my code is this
while true do script.Parent.NPC:MoveTo(Vector3.new(math.random(-820, 840), 0, math.random(-820, 840)), game.Workspace.Terrain) for i= 1,10 do wait(0.5) script.Parent.Head.RakeStep:Play() end wait(5) end
with my map its not working can i have help???
1 | while true do |
2 | script.Parent.NPC.Humanoid:MoveTo(Vector 3. new(math.random(- 820 , 840 ), 0 , math.random(- 820 , 840 ))) --Sorry you would have to manually enter the size of your terrain. |
3 | for i = 1 , 10 do wait( 0.5 ) |
4 | script.Parent.Head.RakeStep:Play() end |
5 | wait( 5 ) |
6 | end |
I don't know if this works or not