How can I check if something exists in a dictionary? The below code seems to sometimes error
if not DataModule.DataStored(Player)["Quests"][RoundData[1]][RoundData[2]][RoundData[3]][RoundData[4]]["StoryTaskArc"] then

I’m trying to check if “StoryTaskArc” doesn’t exist in someone’s quest, however it seems to index nil, why does this problem occur?
bump
could anyone help me with this?
if not DataModule.DataStored(Player)[“Quests”][RoundData[2]][RoundData[3]]
from what i’m seeing, when you index that with: RoundData[4]]
it simply doesn’t exist, so maybe check just do basic if statements to check if each RoundData exists like
if not DataModule.DataStored(Player)[“Quests”][RoundData[2]][RoundData[3]][RoundData[4]] then – round data 4 doesnt exist