I need help. I need script that can check bool value of objects in table, and if their value is “true” and player has it in backpack, print their name.
local Table = {
Apple = true,
Avocado = false,
Banana = true
}
for key, value in Table do
if value then -- Check if = to true
print(key)
end
end
Output:
> Apple
> Banana
2 Likes
local table1 = {
["s"] = true,
["s1"] = true,
["m"] = false
}
for i, v in pairs (table1) do
if v == true then
print(i)
end
end
1 Like
Thank you
Gdhdhdhdhdbxbxbxxvxb
Thank you too
Hdhdhdhdhdhbdbdbdb
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.