You need to save the game time when the potion is bought for each player, then compare that with the current game time. Also, instead of removing the task, you should have a check if it has not been 20 seconds, and set the task there. (if -> set_task) instead of (set_task, if -> remove_task)