So, I am trying to store the cost of something in a table. But the issue is that the cost will not go up and the error comes up. Here is the script.
cost1 = {80,160,200,210,230,250,300,301,302,303,304,305,306,307,308,309,310,311} CostChange.OnServerInvoke = function(player) local cost = player.UpgradeCosts.BackpackUpgrade local lev = player.backpack.WeightLevel1 lev.Value = lev.Value + 1 cost.Value = cost.Value[#cost1 + 1] end
Thanks
This is kind of difficult to answer, you've just given a script with some unknown variables. We hardly know what you're trying to do.
But the error is that you're trying to take a table, and add 1 to it. Once again its hard to find out your intention but if you're trying to add 1 to the table as a value, do table.insert(cost1, 1)
But if you want to add every number in the table by 1 then you're better off just taking every table entry and adding 1 to that, instead of trying to do math on a table object.