Attempt to perform arithmetic (sub) on number and nil error?
I keep getting the error "Attempt to perform arithmetic (sub) on number and nil", I'm not sure what it means and haven't been able to find anything out about it.
Serverscript:
1 | local ModuleScale = require(game:GetService( "ServerScriptService" ).Scaling) |
2 | player.Character.Conditions.Health.Value - = ModuleScale.Scaler(Scaling, Damage) |
Modulescript:
02 | local Players = game:GetService( "Players" ) |
03 | local Player = Players:GetPlayers() [ 1 ] or Players.PlayerAdded:Wait() |
04 | local Char = Player.Character |
07 | function Scale.Scaler(Scaling, Damage) |
08 | if Scaling = = "D" then |
09 | local Factor = 45 / Char.ComboStats.Damage.Value |
10 | local Dmg = Damage * Factor |
11 | return math.round(Dmg) |