These functions don't add or subtract 1 when a child is added to "new."
local num = script.Parent.Parent.num local new = script.Parent new.ChildAdded:connect(function() num.Value = num.Value + 1 end) new.ChildRemoved:connect(function() num.Value = num.Value - 1 end)
Ahh, I see, try adding this in the approximate line. local part = Instance.new("Part")
-- add some sparkles for i = 1, 3 do Instance.new("Sparkles", part) end
print("Part has " .. #part:GetChildren() .. " children") --> Part has 3 children
part:ClearAllChildren()
print("Part has " .. #part:GetChildren() .. " children")