Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = game.Players.LocalPlayer
- mouse = plr:GetMouse()
- wait(4)
- print(mouse.Hit.p)
- hum = plr.Character.Humanoid
- root = plr.Character.HumanoidRootPart
- a = root.Position
- b = Vector3.new(228,0,-6282)
- --b = root.Position + root.CFrame.lookVector * 30 + Vector3.new(0,-2,0)
- pfs = game:GetService('PathfindingService')
- path = pfs:ComputeSmoothPathAsync(a, b, math.huge)
- for i,v in pairs(path:GetPointCoordinates()) do
- local p = Instance.new('Part')
- p.Size = Vector3.new(1,1,1)
- p.Position = v
- p.Anchored = true
- p.CanCollide = false
- p.Parent = workspace.CurrentCamera
- game.Debris:AddItem(p,6)
- end
- for i,v in pairs(path:GetWaypoints()) do
- if v.Action == Enum.PathWaypointAction.Walk then
- hum:MoveTo(v.Position)
- hum.MoveToFinished:Wait()
- end
- if v.Action == Enum.PathWaypointAction.Jump then
- hum.Jump = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement