Using multiple instances of the same module simultaneously

Hi, I am working on adding split screen functionality to my game which requires that my game code module be ran multiple times however when I do this I get error caused by variable name conflicts. Is there anyway I can combat this?

It’d help seeing some code. For instance, how do you require your module and how do you setup the module itself.

If you’ve created everything within the module as a local variable, then I’m not sure how you could end up with name conflicts. Perhaps that was more common with the “module(…, package.seeall)” way of setting up modules, but if you aren’t using that, then I’m out of guesses.

I just had a look and it turns out that the variable was not local so it looks like I found my problem, cannot believe I looked over something like that. Thanks for jogging my memory, if I have any more troubles related to this topic I will post them here :slight_smile: