Automatic synching data to modules on startup

I have worked the past couples of days on datastorages and this also works, only i have been wondering what a good would be to get the playerdata values on startup to also initialize automatically. for other modules to use and set up automatically.

What i mean by that, currently when players get added with a connect function it creates a playerdata class for that player that joins. this only initializes the class for the player, but i need a way for it to not only add the class to the player, but also get these values and set it up automatically for other modules to use.

this system should also work for client side, so client side can also request data and get this on startup. I haven’t come up with any good solutions to work on this problem, since mostly its me overthinking and trying to keep my code and structure dynamic, modular.

Sort of like a game where attributes like health, stamina, coins etc are set up on both client and server side for any other logic handling.

i’d love to hear solutions that may tackle my problem.

1 Like