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.


local Tool = script.Parent;

enabled = true

function onActivated(char)
	if not enabled  then

	Tool.GripForward =,-.759,-.651)
	Tool.GripPos =,-.25,.3)
	Tool.GripRight =,0,0)
	Tool.GripUp =,.451,-.959)

	enabled = false
    game.ReplicatedStorage.HidePlayerBackpack:FireClient() --The part where it fires the event
	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 ="Part", workspace)
	leftlegpart.Name = "leftlegcollide"
	leftlegpart.Size =, 2, 1)
	leftlegpart.Orientation = leftleg.Orientation
	leftlegpart.Transparency = 1
	leftlegpart.Position = leftleg.Position
	local leftlegweld ="WeldConstraint", workspace.leftlegcollide)
	leftlegweld.Part0 = leftleg
	leftlegweld.Part1 = leftlegpart
	local rightlegpart ="Part", workspace)
	rightlegpart.Name = "rightlegcollide"
	rightlegpart.Size =, 2, 1)
	rightlegpart.Orientation = rightleg.Orientation
	rightlegpart.Transparency = 1
	rightlegpart.Position = rightleg.Position
	local rightlegweld ="WeldConstraint", workspace.rightlegcollide)
	rightlegweld.Part0 = rightleg
	rightlegweld.Part1 = rightlegpart
	local leftarmpart ="Part", workspace)
	leftarmpart.Name = "leftarmcollide"
	leftarmpart.Size =, 2, 1)
	leftarmpart.Orientation = leftarm.Orientation
	leftarmpart.Transparency = 1
	leftarmpart.Position = leftarm.Position
	local leftarmweld ="WeldConstraint", workspace.leftarmcollide)
	leftarmweld.Part0 = leftarm
	leftarmweld.Part1 = leftarmpart
	local rightarmpart ="Part", workspace)
	rightarmpart.Name = "rightarmcollide"
	rightarmpart.Size =, 2, 1)
	rightarmpart.Orientation = rightarm.Orientation
	rightarmpart.Transparency = 1
	rightarmpart.Position = rightarm.Position
	local rightarmweld ="WeldConstraint", workspace.rightarmcollide)
	rightarmweld.Part0 = rightarm
	rightarmweld.Part1 = rightarmpart
	local weld1 ="WeldConstraint", humanoidrootpart)
	weld1.Part0 = leftleg
	weld1.Part1 = humanoidrootpart
	local weld2 ="WeldConstraint", humanoidrootpart)
	weld2.Part0 = rightleg
	weld2.Part1 = humanoidrootpart
	local weld3 ="WeldConstraint", humanoidrootpart)
	weld3.Part0 = leftarm
	weld3.Part1 = humanoidrootpart
	local weld4 ="WeldConstraint", humanoidrootpart)
	weld4.Part0 = rightarm
	weld4.Part1 = humanoidrootpart
	local weld5 ="WeldConstraint", humanoidrootpart)
	weld5.Part0 = head
	weld5.Part1 = humanoidrootpart
	local weld6 ="WeldConstraint", humanoidrootpart)
	weld6.Part0 = torso
	weld6.Part1 = humanoidrootpart
	humanoid.WalkSpeed = 0
	humanoid.JumpPower = 0
	humanoid.PlatformStand = true


Local script

	game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

This is the output error

Anyone can help? Thanks!

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