Hello!
I’m trying to get names of the items in the Drop table.
local objectData = {
["Tree"] = {
Name = "Tree",
Tier = 1,
MaxHealth = 10,
Drop = {
-- Trying to get the Stick, Leaves and Log
["Stick"] = 2,
["Leaves"] = 2,
["Log"] = 3,
},
}
}
return objectData
I’ve been trying to get what I want for about a day now and I have kind-of achieved it with this code:
for i, item in pairs(drop) do
print(item)
end
However, this prints the value of the item and not the name. But I’m pretty sure I’m on the right track!
Excuse me for the lack of knowledge in ModuleScripts, I am just now starting to get used to them.