You should look into coroutines. They allow you to create separate threads, and continue running code without yielding your main script.
Here is a post that explains them in more depth, and gives examples of how to use them in your case:
You should look into coroutines. They allow you to create separate threads, and continue running code without yielding your main script.
Here is a post that explains them in more depth, and gives examples of how to use them in your case: