I am using a dictionary to store the number of items a user currently has. I want to be able to add a new key-value to my dictionary for new items.
My dictionary looks like this:
["Weapon"] = {
Sword = 0,
test = 0
}
This is saved inside a datastore so for access to the dictionary you do:
PlayerData[plr]["Weapon"]
I have seen posts and videos where they do:
key="NewSword"
PlayerData[plr]["Weapon"][key] = 1
but that doesn't work.
How could I go about doing this?
Can't you just do PlayerData[plr]["NewKey"] = {--Different Items}
and just save PlayerData[plr] instead of PlayerData[plr]["Weapon"]