Damage not changing?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    have the damage value multiply when a player buys a perk
  2. What is the issue? Include screenshots / videos if possible!
    The damage does not multiply. This used to work but suddenly stopped. I have not made any changes to the game as i was taking a break

client (inside gun model)

local TS = game:GetService('TweenService')
local self = {}

---other info stored here not related to issue

self.LimbDamage 	= {20 * script.Parent.Parent.Variaveis.DoubleTap.Value,22 * script.Parent.Parent.Variaveis.DoubleTap.Value}
self.TorsoDamage 	= {23 * script.Parent.Parent.Variaveis.DoubleTap.Value, 25 * script.Parent.Parent.Variaveis.DoubleTap.Value} 
self.HeadDamage 	= {65 * script.Parent.Parent.Variaveis.DoubleTap.Value,70 * script.Parent.Parent.Variaveis.DoubleTap.Value} 

server

function CalculateDMG(SKP_0, SKP_1, SKP_2, SKP_4, SKP_5, SKP_6, Player, humanoid)

	local skp_0	= plr:GetPlayerFromCharacter(SKP_1.Parent) or nil
	local skp_1 = 0
	local skp_2 = SKP_5.MinDamage * SKP_6.minDamageMod



	if SKP_4 == 1 then

		local skp_3 = math.random(SKP_5.HeadDamage[1] , SKP_5.HeadDamage[2] )
		skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf)

		print (skp_3)


	elseif SKP_4 == 2 then
		local skp_3 = math.random(SKP_5.TorsoDamage[1] , SKP_5.TorsoDamage[2] )
		skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf)
		print (skp_3)

	else
		local skp_3 = math.random(SKP_5.LimbDamage[1] , SKP_5.LimbDamage[2] )
		skp_1 = math.max(skp_2 ,(skp_3 * SKP_6.DamageMod) - (SKP_2/25) * SKP_5.DamageFallOf)
		print (skp_3)
	end
end
local function Damage(SKP_0, SKP_1, SKP_2, SKP_3, SKP_4, SKP_5, SKP_6, SKP_7, SKP_8, SKP_9)


	if SKP_1.Name == "ThunderGun" or  SKP_1.Name == "Zeus Cannon" then
		if SKP_2.Parent.Name == "Vertition's Soul" then
			print "no damage true"
		end

		if SKP_2.Parent.Name == "Moon" then
			print "no damage true"
		end




	else

		if not SKP_0 or not SKP_0.Character then return; end;
		if not SKP_0.Character:FindFirstChild("Humanoid") or SKP_0.Character.Humanoid.Health <= 0 then return; end;


		if SKP_9 == (ACS_0.."-"..SKP_0.UserId) then
			if SKP_7 then
				SKP_0.Character.Humanoid:TakeDamage(math.max(SKP_8, 0))


				return;
			end

			if SKP_1 then
				CalculateDMG(SKP_0, SKP_2, SKP_3, SKP_4, SKP_5, SKP_6)

				return;
			end


		end

	end

end
Evt.Damage.OnServerInvoke = Damage

again this was working fine a few weeks ago. i took a small break and decided to come back and notice the damage was not updating. when the DoubleTap value changes the damage is not multiplied.

1 Like

Gonna be honest this is very unreadable to me

Do you have a client script anywhere? could you tell us what the script is supposed to do?