ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 06 Aug 2016 02:15 AM |
So I followed the Roblox official AI Pathfinding Tutorial but I am getting an error on this script:
path = game:GetService("PathfindingService"):ComputeRawPathAsync(workspace.Start.Position, workspace.Finish.Position, 200) points = path:GetPointCoordinates()
game.Workspace.Points:ClearAllChildren()
for p = 1, #points do part = Instance.new("Part") part.FormFactor = Enum.FormFactor.Symmetric part.CanCollide = false part.Size = Vector3.new(1,1,1) part.Position = points[p] part.Anchored = true part.BrickColor = BrickColor.DarkGray() part.Parent = game.Workspace.Points end
The error is: Points is not a valid member of Workspace Please help |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2016 02:21 AM |
| Is anything named "Points" in the Workspace? If not, that's why. Remember, names are case sensitive. |
|
|
| Report Abuse |
|
|
ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 06 Aug 2016 02:32 PM |
| What? I followed the tutorial exactly and it said nothing about making points a thing in the workspace, can you explain? |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 12:27 AM |
| There's a line in the script that says "game.Worspace.Points" There must be an object in the workspace called 'Points' or the script won't work. |
|
|
| Report Abuse |
|
|
ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 08 Aug 2016 12:29 AM |
| But it is suppose to be referring to what is made in the script isn't it? Also can you watch the tutorial and see what I am doing wrong if you don't know what I am talking about? I am so desperate, lol |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 12:40 AM |
| if you make that line before you make the part, the script will error because the part wasn't there when it was supposed to be found. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 01:27 AM |
Because
1: you copied a wiki script without even understanding it
2: you never put a point model in the workspace |
|
|
| Report Abuse |
|
|
ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 08 Aug 2016 02:09 AM |
Still not working, really confused why. It is the exact same as the tutorial...
If you have any other ideas or know anyone who might can you help me out? |
|
|
| Report Abuse |
|
|
ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 08 Aug 2016 02:13 AM |
| Thanks, I think I know what to do. If not I will be back |
|
|
| Report Abuse |
|
|
ervin1000
|
  |
| Joined: 15 Jul 2009 |
| Total Posts: 13 |
|
|
| 08 Aug 2016 02:19 AM |
It worked, thanks. I did not understand at first but upon further examination of the OFFICIAL tutorial I figured out they left out the part where they make a model called points. I did so and it worked. |
|
|
| Report Abuse |
|
|