Any help would be nice
function onTouch(Hit) if Hit.Parent:findFirstChild("Humanoid") ~= nil then game.Players:GetPlayerFromCharacter(Hit.Parent)["insert 'package''s name here'"]:Destroy() end end local sp = script.Parent sp.OnTouch:connect(onTouch)
if you're meaning the player's backpack, try only deleting it's children:
function deleteChildren(instanceClass) local children = instanceClass:GetChildren() for i = 1,#children do children[i]:Destroy() end end
Closed as Non-Descriptive by User#21908, AswormeDorijan111, and climethestair
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?