Hasli4

rblx. move script2

Dec 24th, 2025 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local character = script.Parent
  2. local humanoid = character.Humanoid
  3. local start = workspace.start
  4. local finish = workspace.finish
  5.  
  6. local startmovebody = character.Torso
  7. while true do
  8. humanoid:MoveTo(start.Position) -- Move to the waypoint
  9. humanoid.MoveToFinished:Wait()
  10. local service = game:GetService('PathfindingService')
  11. local path = service:FindPathAsync(startmovebody.Position,finish.Position)
  12. local points = path:GetWaypoints()
  13. for key,value in pairs(points) do
  14. wait(0.1)
  15. local part = Instance.new ('Part')
  16. part.Parent = workspace
  17. part.Name = 'Part'
  18. part.Anchored = true
  19. part.CanCollide = false
  20. part.Position = value.Position
  21. part.Size = Vector3.new(1,1,1)
  22. part.Transparency = 1
  23. humanoid:MoveTo(part.Position)
  24. humanoid.MoveToFinished:Wait()
  25. part:Destroy()
  26. end
  27. end
  28.  
Advertisement
Add Comment
Please, Sign In to add comment