Custom Toolbar not removing Tools

I have a custom Toolbar Gui, that when I remove my tool from my Inventory system, doesn’t remove from the Toolbar. I keep getting an error saying it can’t find the folder, however the folder has clearly loaded in. What am I doing wrong?

Images

image
image

Code
	for i,v in pairs (Player.Backpack:GetChildren()) and (Player.playerInventory:GetChildren()) do
							if v:FindFirstChild('Placement') and v.Placement.Value == ItemNumber then
								--print('Destroy',v.Name)
								v:Destroy()
													

										if Type == 'Primary' then Player.Character:FindFirstChild("Sheath"):Destroy() 
										elseif Type == 'Shield' then Player.Character:FindFirstChild("ShieldModel"):Destroy()

										end
									end
								end
							end
1 Like

I don’t think you can iterate through two tables like that. You would have to use two separate loops.

If that doesn’t work, try printing player:FindFirstChild('playerInventory')

1 Like

I tried that. And even WaitForChild. Still couldn’t detect it. It’s making me go crazy right now. It should be working.

1 Like