Dropping System Error

I’m trying to make a script to drop all of the things in my inventory, it works, but only if I’m not using it. Here is the script:

for i,v in pairs(p.Backpack:GetChildren()) do
			if v:FindFirstChild("Handle") then

				v:Remove()
				for i, v in pairs(game.ReplicatedStorage.Folder:GetChildren()) do
					v.Parent = workspace
					local pos = p.Character.Torso.Position
					v.Position = Vector3.new(pos.X,pos.Y, pos.Z + 1.5)
					v.Orientation = p.Character.Torso.Orientation
					v.SelectionBox.Visible = false
				end
			else
				for i,v in pairs(p.Character:GetChildren()) do
					if v:FindFirstChild("Handle") then
						v:Remove()
						for i, v in pairs(game.ReplicatedStorage.Folder) do
							v.Parent = workspace
							local pos = p.Character.Torso.Position
							v.Position = Vector3.new(pos.X,pos.Y, pos.Z + 1.5)
							v.Orientation = p.Character.Torso.Orientation
							v.SelectionBox.Visible = false
						end
					end
				end
			end

		end
for _, v in ipairs(p.Backpqck:GetChildren()) do
   if v:IsA("Tool") then
      if v:FindFirstChild("Handle") then
         v.Handle.Parent = workspace
         v.Handle.CanCollide = true
      end
      v:Destroy()
   end
end

local equippedTool = p.Character:FindFirstChildOfClass("Tool")

if equippedTool then
   if equippedTool:FindFirstChild("Handle") then
       equippedTool.Handle.Parent = workspace
       equippedTool.Handle.CanCollide = true
   end
   equippedTool:Destroy()
end