SHARE
TWEET

Parts

a guest May 19th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local points = Instance.new("Folder", workspace)
  2. points.Name = "Points"
  3. local path = nil
  4. while wait(0.1)
  5. for i,Child in pairs(points:GetChildren()) do
  6. Child:Destroy()
  7. end
  8. local P1,P2 = Instance.new("Part", workspace)
  9. P1.Size = Vector3.new(1,1,1)
  10. P2.Size = Vector3.new(1,1,1)
  11. P1.Anchored = true
  12. P2.Anchored = true
  13. P1.CanCollide = false
  14. P2.CanCollide = false
  15. P1.Position = game.Workspace.PhantomFills.HumanoidRootPart.Position + Vector3.new(0,15,0)
  16. P2.Position = game.Workspace.P1.Position + Vector3.new(15,0,15)
  17. path = game:GetService("PathfindingService"):ComputeRawPathAsync(P1.Position, P2.Position)
  18. p = path:GetWayPoints()
  19. for i,v in pairs(p) do
  20. local p = Instance.new("Part", workspace.Points)
  21. p.Size = Vector3.new(1,1,1)
  22. p.Position = v.Position
  23. end
  24. end
  25. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top