![]() ![]() ![]() Local defaultStats =, playerStatInterfaceMt) local function createStats() - used to create a new stat table with default values for each player You may also need to add something that the serverside modulescript doesn’t have to the client. For example, the client probably won’t set data, so the _newindex might be useless on client. I didn’t include an event, but I wrote where to fire events.įor the client you could make something similar, but you won’t need everything in this on the client. I have tested it a little and it seems to work. Here’s an example player data modulescript meant to be used in server scripts. These interface tables can fetch the values from the actual stats or change them and fire events. If you want to have easy access to the player’s data from other scripts and have a changed event that automatically fires when data is changed you can use interface tables that other scripts use to access data. However, making one with changed events isn’t very complicated either. A player data module can be quite simple if you don’t need changed events. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |