Thanks! It's just a simple line of code using transform.Translate it uses the player position and subtracting it's current position and multiplying by a speed variable
why did I put pathfinding in my code
Edit : there are colliders