Hello!
I would like to know if there is any common practice when sharing a created object between multiple scripts.
Realistically I understand that the best way would be to just structure your code in a way so that this doesn’t become an issue, but in my case it’s better to have a shared cache of it.
I have an object that is essentially an extension of the player and contains values about that player. I would like to have a method that is module.get(UserID) which either does module.new() or retrieves the playerObject from the modules cache.
Is this an acceptable method or should I rethink?
I’m also looking into the possibility of generating UUIDS and add to the cache if I wanna do this for other objects I have.