Hello, I want to get a value which is under a specific name in a module script and then see if the value (droppable) is set to true, if not then i want it to print. I can’t get it to change the Gui info to not become visible when the item’s value is detected.
for i,v in pairs(itemModule) do
if itemValue == i then
if v.droppable == true then
gui.Info.Visible = false
gui.Drop.MouseButton1Click:Connect(function()
if itemValue.Value > 0 then
local DropItem = DropItem:InvokeServer(itemFrame.Name)
if DropItem == true then
if itemValue.Value > 0 then
itemFrame.ItemAmount.Text = itemValue.Value
end
end
end
end)
end
else
gui.Info.Visible = true
end
end
ModuleScript:
local ItemsModule = {
["Apple"] = {
Name = "Apple",
Amount = 0,
Desc = "apple",
droppable = true,
};
}
return ItemsModule