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:
local ModuleScale = require(game:GetService("ServerScriptService").Scaling)
player.Character.Conditions.Health.Value -= ModuleScale.Scaler(Scaling, Damage)
Modulescript:
local Scale = {}
local Players = game:GetService("Players")
local Player = Players:GetPlayers()[1] or Players.PlayerAdded:Wait()
local Char = Player.Character
function Scale.Scaler(Scaling, Damage)
if Scaling == "D" then
local Factor = 45 / Char.ComboStats.Damage.Value
local Dmg = Damage * Factor
return math.round(Dmg)
end
end
return Scale

2 comments
How would the module fail to return a number?
its prob this "if Scaling == "D" then" if scaling is not D it returns nothing therefor nil