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?

2 comments
It should work. Try PlayerSata.plr.Weapon[“NewSword”] = 1.
You should also be using the plr.UserId right?