I’m using a thread because this package is for multiplayer games and I need the game loop running constantly (the game loop is in the proxy function). Now that I think about it, I could probably just have some code in the game loop to check for messages every frame. I’m not on my computer right now so I’ll check it out once I am. I got this thread solution from @elis.byberi in this post.