So Im trying to make a custom backpack system with childadded
plr.Backpack.ChildAdded:Connect(function(child)
print(child) --prints Tool
local MainGui = plr.PlayerGui.MainGui
local Tools = MainGui.Tools
local CloneGuiTool = Tools.Tool:Clone()
CloneGuiTool.Text = child.Name
CloneGuiTool.Name = child.Name
CloneGuiTool.Parent = Tools
CloneGuiTool.Visible = true
end)
plr.Backpack.ChildRemoved:Connect(function(child)
print(child) --prints GUN
local MainGui = plr.PlayerGui.MainGui
local Tools = MainGui.Tools
Tools:FindFirstChild(child.Name):Destroy()
end)
The Tool name that gets added is “GUN”
when I print the child argument of the ChildAdded then it just prints “Tool” but when I remove the tool from the backpack and I print the Argument of the ChildRemoved then it prints GUN, how do I make the same thing happen with the child Added?