generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Simple Pathfinding Error PLEASE HELP!

Previous Thread :: Next Thread 
ervin1000 is not online. 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
Knightofnight05 is not online. Knightofnight05
Joined: 03 May 2014
Total Posts: 345
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 is not online. 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
Knightofnight05 is not online. Knightofnight05
Joined: 03 May 2014
Total Posts: 345
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 is not online. 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
Knightofnight05 is not online. Knightofnight05
Joined: 03 May 2014
Total Posts: 345
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image