Once again having troubles with putting values into tables. This time it is an item that is going to be put in a table so that I can keep track of how many parts there are in there. Here is what I have:
bags = {} trunk.Touched:connect(function(hit) if hit.Name == "MoneyBag" then local moneybag = hit print("yes") if moneybag then local money = moneybag:FindFirstChild("Money").Value print("funker") for _, moneybag in pairs(bags) do print("japp") if moneybag ~= bags then table.insert(bags, moneybag) totalmoney = totalmoney + money print("no") end end end end end)
Forgot to add the table in the first version, but there it is.
Thank you for your help (: