Does anyone know how to get the distance between owner.position and to hitobject
Use owner.getDistanceTo(hitobject). That’ll work. If you wanna know more about functions for different objects, use print (dir(object or module)).
joeman16 is 100% right