So here is what I have so far(local script inside of a text label):
local plr = game.Players.LocalPlayer
local passes = plr:WaitForChild("leaderstats"):WaitForChild("Passes")
local fails = plr:WaitForChild("leaderstats"):WaitForChild("Fails")
local total = passes.Value + fails.Value
local average = (passes.Value / total) * 100
script.Parent.Text = "Average Pass Level: "..tostring(average)
passes:GetPropertyChangedSignal("Value"):Connect(function()
total = passes.Value + fails.Value
average = math.floor((passes.Value / total) * 100)
script.Parent.Text = "Average Pass Level: "..tostring(average)
end)
fails:GetPropertyChangedSignal("Value"):Connect(function()
total = passes.Value + fails.Value
average = math.floor((passes.Value / total) * 100)
script.Parent.Text = "Average Pass Level: "..tostring(average)
end)
I tested it and the TextLabel's text was: Average Pass Level: -nan(ind).
There are no errors or warnings... could someone explain where I am going wrong?

1 comment
passes.Valueortotalare probally nil, try printing those values