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
your module script failed to return a number therefor the Attempt to perform arithmetic (sub) on number and nil
--[[ number = player.Character.Conditions.Health.Value nil = ModuleScale.Scaler() Sub = Subtract ]]