Pathfinding find paths needs to be run every few seconds or if the distance is not met..there are numerous errors in your script..do you have a set of conditions to find the path? Its not shown...
Yes.
Has LineOfSight to Hero
Evero 0.1 seconds -------> set alarm to 1
find path to (hero.X,hero.y)