I have been trying to fix this bug and its driving me nuts only the other Fixes I have checked say that you may have out something static I checked multiple times and I am 99% sure I do not have the problem with it being static this is the script I have beenb having Problems with
private void Update() {
if (Vector3.Distance(player.FindGameObjectWithTag("Tag").transform.position, lastEndPosition) < PLAYER_DISTANCE_SPAWN_LEVEL_PART) {
SpawnLevelPart();
}
}