Attempt to perform arithmetic (mul) on number and nil

i have an error saying something about arithmetic mul on number and nil in line 13 in this script

local remote = game.ReplicatedStorage.Remotes.GetSawInfo

remote.OnServerInvoke = function(plr,sawName,head,handle,treename)
	local info = {}	
	local sawmodule = require(game.ServerScriptService.Pily.RodzajePil:FindFirstChild(sawName))
	local sawheadmodule = require(game.ServerScriptService.Pily.RodzajeGlow:FindFirstChild(head))
	local sawhandlemodule = require(game.ServerScriptService.Pily.RodzajeGlow:FindFirstChild(head))
	
	if table.find(sawhandlemodule.specialtreeclasses,treename) then
		info.cooldown = sawmodule.basecooldown*sawhandlemodule.specialtreemnoznikopoznienia
		info.dystans = sawmodule.basedystans*sawhandlemodule.specialtreemnoznikdystansu
	else
		info.cooldown = sawmodule.basecooldown*sawhandlemodule.mnoznikopoznienia
		info.dystans = sawmodule.basedystans*sawhandlemodule.mnoznikdystansu
	end
	if table.find(sawheadmodule.specialtreeclasses,treename) then
		info.minobjetosc = sawmodule.baseminobjetosc*sawheadmodule.specialtreemultiplierminobjetosci
		info.maxobjetosc = sawmodule.basemaxobjetosc*sawheadmodule.specialtreemultipliermaxobjetosci
	else
		info.minobjetosc = sawmodule.baseminobjetosc*sawheadmodule.multiplierminobjetosci
		info.maxobjetosc = sawmodule.basemaxobjetosc*sawheadmodule.multipliermaxobjetosci
	end
	
	return info
end

the line im talking about is this one

info.cooldown = sawmodule.basecooldown*sawhandlemodule.mnoznikopoznienia

here is sawhandlemodule

local module = {
	mnoznikopoznienia=1; -- opoznienie pily pomiedzy scieciami
	mnoznikdystansu=1;
	specialtreeclasses={ -- rodzaje drzew na ktore siekierka bedzie dzialac lepiej niz normalnie
		"Brak"
	};
	specialtreemnoznikopoznienia=2; -- opoznienie pily jezeli drzewo ktore scina znajduje sie w specjalnych rodzajach drzew
	specialtreemnoznikdystansu=2;
	kolor=Color3.fromRGB(86, 66, 54);
	material=Enum.Material.Wood
}

return module

as you can see, mnoznikopoznienia is not nil, its 1 so i dont know whats the problem here

Arithmetic mul means multiplication.
This error is saying that either sawmodule.basecooldown or sawhandlemodule.mnoznikopoznienia do not exist. Make sure both do.

ahh nevermind i found the issue i think

1 Like

Could you show the sawhandlemodule?
Edit: Glad you found the issue, make sure to mark either your post or mine as a solution if you have no further issues.

nah im just gonna delete since its a variable issue, my fault
edit: welp i have no permissions

1 Like