Though both of them are valid-ish answers. Simplicity calls for an even better one!
local Players = game:GetService("Players")
local Debris = game:GetService("Debris")
Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
for i,v in pairs(Character:GetChildren()) do
if v:IsA("Accoutrement") then
Debris:AddItem(v, 1)
end end
Character.ChildAdded:connect(function(Item)
if Item:IsA("Accoutrement") then
Debris(Item, 1)
end
end) end) end)
So yeah, as you can see, there's many ways to do this, though my way is a way I've used a lot as someone that makes these scripts (sadly) a lot.
Any questions? Be sure to ask any of us!
2 comments
Scripting Helpers is not a request site; please edit your post to include your code.
The ClassName is "Accessory"