#Need help thinking of how I should make a system
1 messages · Page 1 of 1 (latest)
Lots of design choices here but my mind starts with the idea of tables
make a modulescript that loads and saves player data in tables for example
modulescript.player_data = {}
save data to datastore only when player is leaving the game or server is shutting down or something like that
so the proggress is saved
when player joins load their data from datastore and store it in a temporary table on server side and validate all changes to it to prevent exploits
make changes to that temporary table for example adding level to a player
and when player leaves save that temporary table in datastore
as for changing the stats you could make a function for that, it will be easy to use in different scripts too if you use modulescript
** You are now Level 1! **
yea idk
Okay i see ill try using a module script with tables that can keep track of playerstats and if im correct a module script can speak to others so i can just use for damage the new module script inside my attacking module right?
Yes you can require a module script so you can maybe use a function to add some type of data