Hello, I am really confused at the moment, since I'm debugging, could someone help me determine the issue with this portion of my Script? I may be just blind by those who know s the stress of debugging, be with me:)

There is a NumberValue is located inside of carrierInventory called Capacity, there is a statement that adds the slotSize (a NumberValue inside of the item, this represents how much space it takes up) to its current value, It doesn't seem to work properly, what's wrong?

clickDetector.MouseClick:Connect(function(player)
   local character = player.Character or player.CharacterAdded:wait()
   local capacity = carrierInventory:FindFirstChild("Capacity").Value
   toInventory = false
   if (character and item) then
      local slotSize = findObject(item, "StringValue", "SlotSize")
      capacity = capacity + slotSize
   end
end)

Thanks!

1 comment

0

I figured out whats wrong, I didn't define slotSize's Value, just it's Object index