I want to delete just a Sword...
Thanks for helping out in advance.
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid")~=nil then
local user=game.Players:GetPlayerFromCharacter(hit.Parent)
if user~=nil then
local backpack=user:findFirstChild("Backpack")
if backpack~=nil then
local p=backpack:GetChildren()
for i=1,#p do
if p[i].className=="Sword" then
p[i]:remove()
end
if p[i].className=="Tool" then
p[i]:remove()
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched)

2 comments
Thank you so much! You're right, I'm super terrible with code and you know exactly what you're talking about.
I like your wording, "No duh"