Attempt to perform arithmetic (sub) on nil and number Error

Why am I getting a error on dividing the number? (This is a module script)

	local WeaponStat = WeaponStats.getStats(currentWeapon)
	local ParryPosture = WeaponStat.ParryDamage
	
	
	
	char:SetAttribute("Blocking", char:GetAttribute("Blocking") + ParryPosture) 
	eChar:SetAttribute("Blocking", eChar:GetAttribute("Blocking") - ParryPosture /2) 

You put (sub) in there, meaning when you do arithmetic on the addition it works?

If not, then I’m assuming you aren’t recieving a number when you’re grabbing the ParryPosture value, make sure to set the attribute as a number value, and then for WeaponStat.ParryDamage, im also assuming you’re using a numbervalue there, but to be safe do

tonumber(ParryPosture)

And also make sure when you’re grabbing the attribute it’s not nil, the nil and number error could be meaning that you’re not recieving the attribute in the first place

(apologies for any mistakes, im a bit sleepy rn)