KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Jul 2014 11:28 AM |
want an ai to get to a point.
start = game.Workspace.Part1.Position; end = game.Workspace.Part2.Position; game.Workspace.Part1:remove() game.Workspace.Part2:remove()--so nothing is in the way path = game:service("PathfindingService"):ComputeRawAsync(script.Parent.Torso.Position, end);
yeah....
what did I do wrong?
|
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:29 AM |
You can't remove your points or else the path will have no points!
You can keep them there. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:30 AM |
| end. Look at it and tell me why you don't use it as a variable |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:31 AM |
LOL Just noticed that.
Yeah, you should change it to finish.
Using end as a variable is like using nil as a variable; not good |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Jul 2014 11:32 AM |
| Well, it starts where the ai is,,,, yes? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:33 AM |
| Yes, but end is a blue word. It marks the stop of functions, loops, and if statements. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:39 AM |
"blue word"
blue words are usually keywords. Some blue words (IE: min) can be used fine. |
|
|
| Report Abuse |
|
|
Patrolics
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 149 |
|
|
| 29 Jul 2014 11:39 AM |
Why are there so many people who complain about Pathfinding!?!?! -.- Why can't they just read the other answered threads? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:40 AM |
| Because most of the problem concerning the same service are different. |
|
|
| Report Abuse |
|
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
|
| 29 Jul 2014 11:40 AM |
| Lol, havin' brain farts aren't we there. "Blue words." XD |
|
|
| Report Abuse |
|
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
|
| 29 Jul 2014 11:42 AM |
| Just turn off CanCollide and make them invisible. Try that. |
|
|
| Report Abuse |
|
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
|
| 29 Jul 2014 11:42 AM |
OH AND
its GetService not service. |
|
|
| Report Abuse |
|
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:48 AM |
Hey, it's a nickname for "keywords" :C
Anyway :service () is deprecated and should be avoided (ALONG WITH :remove ()!) |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:48 AM |
| All the camelCase methods and events are deprecated, and you should be using the CamelCase methods (Basically, its FindFirstChild, not findFirstChild) |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:49 AM |
Also, Remove is deprecated in favor of Destroy.
ClearAllChildren is not deprecated, but should be avoided in favour of using GetChildren, a for loop and Destroy. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:50 AM |
Not, the capitalization of the first word in a method is irrelevant.
:destroy () == :Destroy () :findFirstChild () == :FindFirstChild ()
There are few outliers: :connect () ~= :Connect () -- that will error :Play ~= :play () -- also errors |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:51 AM |
| Why is ClearAllChildren () not favored over :GetChildren () looping? |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:53 AM |
@maxomega3: I never said they did not work, I said not to use them as they are deprecated.
And ClearAllChildren does not use Destroy, but Remove, so you will get memory leaks if you use it when you have events connected. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:55 AM |
Wow. Lazy roblox!
Not, I'm pretty sure that they are the same method. |
|
|
| Report Abuse |
|
|