Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Make items in the Player's Inventory fall out when they die? Do I have to use a LocalScript, or a regular script? If any of those two, where do I put them (Say Workspace, or StarterPack)

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

To do this then what you have to do is just take everything in their backpack and make it's parent the workspace. Pretty fun and simple(:

--In the character

script.Parent.Humanoid.Died:connect(function()
    plr = game.Players:GetPlayerFromCharacter(script.Parent)
    c = plr.Backpack:GetChildren()
    for i = 1,#c do
        c[i].Parent = game.Workspace
    end
end)

Use a Died event to find when they die, get the children of their backpack, and parent them to the workspace.

-Goulstem

Ad

Answer this question