Attempt to perform arithmetic (add) on number and table

function DropSystem.DropItems()
	
	local Sum = 0
	for itemName, Chance in pairs(ItemTable.Weapons) do
		Sum += Chance --ERROR IS HERE
	end
	
	local RandomNumber = math.random(Sum)
	for itemName,Chance in pairs(ItemTable.Weapons) do
		if RandomNumber <= Chance then
			return itemName
		else
			RandomNumber -= Chance
		end
	end
end
local ItemsModule = {}
local ItemModels = game:GetService("ReplicatedStorage").Items.Models

ItemsModule.Weapons = {
	["Sword"] = {Chance = 55, PhysicalPower = math.random(25,60), SpellPower = math.random(1,10), Value = 100, Upgrades = 200, Model = ItemModels.Sword},
	["Wand"] = {Chance = 30, PhysicalPower = math.random(1,15), SpellPower = math.random(6,40), Value = 100, Upgrades = 200, Model = ItemModels.Wand},
	["Staff"] = {Chance = 15, PhysicalPower = math.random(1,20), SpellPower = math.random(30,80), Value = 100, Upgrades = 200, Model = ItemModels.Staff},
}

return ItemsModule

so im trying to make a loot table so the player can be awarded items with a chance to get rarer ones and stuff, i think i understand what im doing wrong here, i just dont know how to fix it.

Chance looks like this
{Chance = 55, PhysicalPower = math.random(25,60), SpellPower = math.random(1,10), Value = 100, Upgrades = 200, Model = ItemModels.Sword}
If you print Chance, that’s one of the things it will show.
You probably meant Sum += Chance.Chance

hmm doing this says that Chance = nil

any help would be greatly appreciated!

+= is a shorthand for Sum = Sum + Chance. It does not add the value of the variable Chance to Sum. It adds the value of the variable Sum to itself and then changes the value of Sum to that.
You should use Sum = Sum + Chance.