Cannot Access the A* Scripts from another script on object

GetComponent< AIDestinationSetter >().Target = FindClosestFood();

is my line of code(without the spaces obviously) it is not registering that AIDestinationSetter is attached to my object and i cannot edit the target variable because of this… Could this be due to the location of the script intself in my project folders?

Thanks in advance!


Do you have ‘using Pathfinding’ at the top of the script?