Pet Multiplier two functions


local function getMultiplier(Player, multiplier1)
	-- Multiplier1 or Multiplier2
	local Multi = 0
	for i,v in pairs(Player.Pets:GetChildren()) do
		if v.Equipped.Value == true then
			Multi = Multi + v[multiplier1].Value
		end
	end
	return Multi
end

function GetClicks(howmuch, Player)
	if P1s.Value >= 1 or P1m.Value >= 1 or P1h.Value >= 1 or P1d.Value >= 1 then
		
		Clicks.Value = Clicks.Value * getMultiplier(Player, "Multiplier1").Value + 5 * 2
		
	else
		Clicks.Value = Clicks.Value * getMultiplier(Player, "Multiplier1").Value + 5
	end
end

How do I make the GetClicks function work with Pet Multiplier function. Problem is

Players.FelixProfit.PlayerGui.ScreenGui.MainScript:33: attempt to index nil with ‘Pets’

1 Like

What’s the value of Player? It seems like it’s nil from the error message.