swooby
|
  |
| Joined: 30 Dec 2010 |
| Total Posts: 1986 |
|
|
| 20 Nov 2016 07:46 AM |
for some reason this script just makes you walk to a random position and not what is told
local plr = game.Players.LocalPlayer local player = game.Players.LocalPlayer.Character cp = workspace.WalkToPts.ChoseLeft1
repeat wait() player.Humanoid.WalkToPoint=Vector3.new(cp.CL1.Position) until (player.HumanoidRootPart.Position - cp.CL1.Position).magnitude <=2
drink lots of water or ur gonna die |
|
|
| Report Abuse |
|
|
|
| 20 Nov 2016 08:24 AM |
You don't need to make a Vector3 out of a Vector3
Vector3.new(cp.CL1.Position) can just be cp.CL1.Position
Otherwise, it'll walk to 0,0,0 it seems. |
|
|
| Report Abuse |
|
|
swooby
|
  |
| Joined: 30 Dec 2010 |
| Total Posts: 1986 |
|
|
| 20 Nov 2016 08:26 AM |
ok thanks, also i need help with pathfinding, also seems to walk to 0,0,0 for some reason
local plr = game.Players.LocalPlayer local player = game.Players.LocalPlayer.Character
path = game:GetService("PathfindingService"):ComputeRawPathAsync(player.HumanoidRootPart.Position, workspace.WalkToPts.StartPoint.Position,400) points = path:GetPointCoordinates() for i,node in ipairs(points) do player.Humanoid.WalkToPoint=Vector3.new(node[i]) repeat wait() until (node - player.HumanoidRootPart.Position).magnitude <= 4
end
drink lots of water or ur gonna die |
|
|
| Report Abuse |
|
|
|
| 20 Nov 2016 08:30 AM |
| Vector3.new(node[i]) -> node |
|
|
| Report Abuse |
|
|
swooby
|
  |
| Joined: 30 Dec 2010 |
| Total Posts: 1986 |
|
|
| 20 Nov 2016 08:55 AM |
alright it works, but it only goes to the first point then stops --my script now
local plr = game.Players.LocalPlayer local player = game.Players.LocalPlayer.Character
path = game:GetService("PathfindingService"):ComputeRawPathAsync(player.HumanoidRootPart.Position, workspace.WalkToPts.StartPoint.Position,400) points = path:GetPointCoordinates() print(points[1]) for i,node in ipairs(points) do player.Humanoid.WalkToPoint=(node) repeat wait() until (player.HumanoidRootPart.Position-node).magnitude <= 1
end
drink lots of water or ur gonna die |
|
|
| Report Abuse |
|
|
swooby
|
  |
| Joined: 30 Dec 2010 |
| Total Posts: 1986 |
|
|
| 20 Nov 2016 09:22 AM |
b
drink lots of water or ur gonna die |
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
swooby
|
  |
| Joined: 30 Dec 2010 |
| Total Posts: 1986 |
|
|
| 20 Nov 2016 09:34 AM |
finally got it, thanks for the help guys!
drink lots of water or ur gonna die |
|
|
| Report Abuse |
|
|