$direction = new Vector3($player->x - $b->x,$player->y - $b->y,$player->z - $b->z) And why do you use a knockback base of -0.1 ?