Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this arithmetic return as an error?

Asked by 3 years ago
local hp = tonumber(plr.Stats.Health.Value) * (tonumber(plr.Stats.Hpt.Value) * 0.07 + 1)

Thats the line that returns as an error, and I get "attempt to perform arithmetic (add) on number and nil" as the error. I'm not sure what nil means, because the value does exist. Can anyone help?

0
Hpt's Value is nil. Ziffixture 6913 — 3y
0
i just checked... Why is the string literally "nil"? Trisodin529 89 — 3y
0
thank youuuu i didnt realize Trisodin529 89 — 3y

Answer this question