Move towards with some extras

hello,

I am trying to use a move towards function where a player will go to the exact position of the target. my problem now is one the player destroy the target, the position of the player is a bit off from the original position of the target. (i am controlling the player with a force sensor) how to write a code where the player will go to the exact position of the target that it destroyed?

Instead of moving towards the target itself, make a copy of the target’s position. Have the player move toward the target’s position rather than the target itself. That way, when the target gets destroyed, the point that the player is moving toward will stay the same.