Need help with adding networth

Hello! I am currently adding up a players networth, then printing it. (Note: I will do something with networth later)

However, it prints

LocalWE Has a networth of $0

Even though I have most of the characters in the game.

local serverStor = game:GetService("ServerStorage")

game.Players.PlayerAdded:Connect(function(plr)
	local val = 0
	for i, v in pairs(plr:WaitForChild("Characters"):GetChildren()) do
		local module = require(serverStor.Characters[v.Name])
		val += module.Cost
	end
	print(plr.Name.." Has a networth of $" ..val)
end)

Modules thing is Cost
image

Here are where each ModuleScript is located:
image

Here are where the owned characters are located:
image

If you can help, please let me know. Thanks! WE

Recently tried ipairs, but it does the same thing. I thought my requiring the module was wrong, but when I added other bodies and kart parts, it still says 0.

And the other kart parts don’t use a Module. They are BaseValue based.

So that leaves it off that my for loop is somehow wrong.

Have you tried printing val and Module.Cost?

I printed val by itself, and it said 0, but nothing printed when I tried printing v and module.Cost

local serverStor = game:GetService("ServerStorage")

game.Players.PlayerAdded:Connect(function(plr)
	local val = 0
	for i, v in pairs(plr:WaitForChild("Characters"):GetChildren()) do
		local module = require(serverStor.Characters[v.Name])
		print(v)
		print(module.Cost)
		val += module.Cost
	end
	print(plr.Name.." Has a networth of $" ..val)
	print(val)
end)

Turns out, the characters were not loaded yet. I just simply did ChildAdded and that did the job.