Right now, I am very satisfied with the way I am handling the client viewing the server's data. In essence, the player's data (dictionary) is 'converted' to folders and attributes for the client's viewing sake. So, the dictionary would look like this:
{
Stats = {
Money = 300,
Exp = 200,
},
Others = {
TypeA = 'Hi',
TypeB = 'Bye',
},
}
And the final result would look something like this:
Stats (Folder) Attribute: Money, 300 Attribute: Exp, 200
Others(Folder) Attribute: TypeA, 'Hi' Attribute: TypeB, 'Bye'
Not only that, but when the data is updated, the values are updated/overwritten as well. This allows the client to listen in without any remotes. I find this system almost flawless (to me), but an issue has arisen. This works well with changing and adding values... but not well with deleting them.
This is especially annoying when the values won't delete themselves when you remove them from the array. Especially in inventories! For example, say you sell an item and it removes the value from the array on the server. And then, it doesn't remove itself from the folders, causing the client to still think they have an item (only visually). How would I detect this change, or in other words, is there any ways to replicate constantly-changing dictionaries to folders? I have tried deleting the folders on every change (which does work), but the client listening in with changed signals get deleted, and that defeats the whole purpose. I'd love some input; thank you!

1 comment
Remote Events