Arguement 1 missing or nil error when trying to hide Backpack with RemoteEvent when the gear is activated

Hello, I’v been trying to make it so whenever you drink glue (don’t ask why), it sends a RemoteFunction from the server script inside the gear to the local script so the Backpack hides and therefore prevent the player from unequipping when the glue is being drank. The only problem is that I get an error and I’m not sure how to fix it.

Script

local Tool = script.Parent;

enabled = true


function onActivated(char)
	if not enabled  then
		return
	end

	Tool.GripForward = Vector3.new(0,-.759,-.651)
	Tool.GripPos = Vector3.new(1.5,-.25,.3)
	Tool.GripRight = Vector3.new(1,0,0)
	Tool.GripUp = Vector3.new(0,.451,-.959)


	Tool.Handle.DrinkSound:Play()
	enabled = false
    game.ReplicatedStorage.HidePlayerBackpack:FireClient() --The part where it fires the event
	wait(3)
	
	local leftleg = Tool.Parent:FindFirstChild("Left Leg")
	local rightleg = Tool.Parent:FindFirstChild("Right Leg")
	local leftarm = Tool.Parent:FindFirstChild("Left Arm")
	local rightarm = Tool.Parent:FindFirstChild("Right Arm")
	local head = Tool.Parent:FindFirstChild("Head")
	local torso = Tool.Parent:FindFirstChild("Torso")
	local humanoidrootpart = Tool.Parent:FindFirstChild("HumanoidRootPart")
	local humanoid = Tool.Parent:FindFirstChild("Humanoid")
	
	local leftlegpart = Instance.new("Part", workspace)
	leftlegpart.Name = "leftlegcollide"
	leftlegpart.Size = Vector3.new(1, 2, 1)
	leftlegpart.Orientation = leftleg.Orientation
	leftlegpart.Transparency = 1
	leftlegpart.Position = leftleg.Position
	local leftlegweld = Instance.new("WeldConstraint", workspace.leftlegcollide)
	leftlegweld.Part0 = leftleg
	leftlegweld.Part1 = leftlegpart
	
	local rightlegpart = Instance.new("Part", workspace)
	rightlegpart.Name = "rightlegcollide"
	rightlegpart.Size = Vector3.new(1, 2, 1)
	rightlegpart.Orientation = rightleg.Orientation
	rightlegpart.Transparency = 1
	rightlegpart.Position = rightleg.Position
	local rightlegweld = Instance.new("WeldConstraint", workspace.rightlegcollide)
	rightlegweld.Part0 = rightleg
	rightlegweld.Part1 = rightlegpart
	
	local leftarmpart = Instance.new("Part", workspace)
	leftarmpart.Name = "leftarmcollide"
	leftarmpart.Size = Vector3.new(1, 2, 1)
	leftarmpart.Orientation = leftarm.Orientation
	leftarmpart.Transparency = 1
	leftarmpart.Position = leftarm.Position
	local leftarmweld = Instance.new("WeldConstraint", workspace.leftarmcollide)
	leftarmweld.Part0 = leftarm
	leftarmweld.Part1 = leftarmpart
	
	local rightarmpart = Instance.new("Part", workspace)
	rightarmpart.Name = "rightarmcollide"
	rightarmpart.Size = Vector3.new(1, 2, 1)
	rightarmpart.Orientation = rightarm.Orientation
	rightarmpart.Transparency = 1
	rightarmpart.Position = rightarm.Position
	local rightarmweld = Instance.new("WeldConstraint", workspace.rightarmcollide)
	rightarmweld.Part0 = rightarm
	rightarmweld.Part1 = rightarmpart
	
	local weld1 = Instance.new("WeldConstraint", humanoidrootpart)
	weld1.Part0 = leftleg
	weld1.Part1 = humanoidrootpart
	local weld2 = Instance.new("WeldConstraint", humanoidrootpart)
	weld2.Part0 = rightleg
	weld2.Part1 = humanoidrootpart
	local weld3 = Instance.new("WeldConstraint", humanoidrootpart)
	weld3.Part0 = leftarm
	weld3.Part1 = humanoidrootpart
	local weld4 = Instance.new("WeldConstraint", humanoidrootpart)
	weld4.Part0 = rightarm
	weld4.Part1 = humanoidrootpart
	local weld5 = Instance.new("WeldConstraint", humanoidrootpart)
	weld5.Part0 = head
	weld5.Part1 = humanoidrootpart
	local weld6 = Instance.new("WeldConstraint", humanoidrootpart)
	weld6.Part0 = torso
	weld6.Part1 = humanoidrootpart
	
	humanoid.WalkSpeed = 0
	humanoid.JumpPower = 0
	wait(3)
	humanoid.PlatformStand = true
end

script.Parent.Activated:connect(onActivated)

Local script

game.ReplicatedStorage.HidePlayerBackpack.OnClientEvent:Connect(function()
	game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
end)

This is the output error
image

Anyone can help? Thanks!

Nevermind, just had to move the local script inside of the gear and rescript a bit.