Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I remove someones package when they touch a part?

Any help would be nice

5 comments

0

what do you mean "package"

0

is it the player's backpack?

0

or is it a model in the player's character?

0

You will be moderated for a nondescriptive question which does not follow the guidelines on this website.

0

You don't follow the guidelines

1 answer

✓ Accepted answer
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

4 comments

0

This Is Not A Request Site!

0

Do not respond to requests which provide no script and no background whatsoever.

0

We are not a request/spoon feed site.

0

Damn!

This discussion is preserved as it was. New answers, comments, and votes are closed.