you dont need a while loop for such things , especially one running a c scan every frame.

a simple enable impact should do just fine , and its event function can check to see if it was the player who collided

enable impact does not require a while loop running.