Get the Total Value of Multiple Values (IntValue(s))

Very basic question, but I’m struggling to figure this out. I have a folder inside the player full of IntValues (total of 30) and I’m trying to accomplish a for loop that adds up the values total value.

for _, wand in pairs(wands) do --Ignore
	if wand:IsA("ImageLabel") then --Ignore
		local w = wandsFolder:WaitForChild(wand.Name) --Ignore
		wand.Visible = w.Value > 0 --Ignore
		total_wands.Value = --Need Help Here
	end	
end

I’m totally stumped on this, I’m pretty sure I have to do something related to w.Value (as w is the IntValue) so any help is appreciated, thanks in advanced,
~Notrealac0unt

1 Like
total_wands.Value = 0
for _, wand in pairs(wands) do --Ignore
	if wand:IsA("ImageLabel") then --Ignore
		local w = wandsFolder:WaitForChild(wand.Name) --Ignore
		wand.Visible = w.Value > 0 --Ignore
		total_wands.Value = total_wands.Value + w.Value
	end	
end
3 Likes