How to find a table in a table?

Hi everyone! I am new so idk how to do this so i need help!
I need to find a table in a table, to make taunt system.
Everytime i try to do something, it finishes with an error or a nil :frowning:
Thats my loader :

local DS = game:GetService("DataStoreService")

local plr = game.Players:GetPlayerFromCharacter(script.Parent)
local plrid = plr.UserId
local char = plr.Character

local taunts = {}
local tauntstore = DS:GetDataStore("PlayerTaunts")
taunts = tauntstore:GetAsync(plrid)

local havesleep = Instance.new("BoolValue")
local equippedsleep = Instance.new("BoolValue")
local slotsleep = Instance.new("IntValue")
havesleep = taunts[table.find(taunts["SleepTaunt"], )] -- idk what to set here so its blank fornow
equippedsleep = 0 --for now its blank too
slotsleep = 0 --for now its blank too
print(havesleep)

and whats my table looks like (from another script) :

local table = {
	["SleepTaunt"] = {
		["Have"] = "Yes",
		["Equipped"] = "No",
		["Slot"] = "nil"
	}
}

Tks everyone who read this, and hope u will help me :smiley:

It’s a dictionary inside another dictionary. Just index directly with the attributes.

1 Like

ummm… ik u say theres something todo but dont understand ^^
can you explain a little more or send a link of something to help me?

1 Like

For this example, just simplify it as taunts["SleepTaunt"]["Have"], based on the current table format of what we have seen.

2 Likes

thanks, it works :smiley:
i searched so much time to find something but it was tables and not dictionarys, so i didnt finded what i needed ^^
image

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.