of     1   

Spxders
#185901918Wednesday, March 23, 2016 4:48 PM GMT

Does anyone know how to script when a player dies their backpack items drop where they died?
John467583
#185902418Wednesday, March 23, 2016 5:00 PM GMT

game.Players.PlayerAdded:connect(function(player) while not player.Character do wait() print("no character") end player.Character.Humanoid.Died:connect(function() local torsoCFrame = player.Character.Torso.CFrame for i,v in pairs(player.Backpack:GetChildren()) do if v:IsA("Tool") then -- final check v.Parent = game.Workspace v.Handle.CFrame = torsoCFrame end end end) end) havent tested it out yet. probably going to be wrong cause i suck at scripting
CloneTrooper1019
#185902722Wednesday, March 23, 2016 5:08 PM GMT

local function onPlayerAdded(player) local function onCharacterAdded(char) local backpack = player:WaitForChild("Backpack") local humanoid = char:WaitForChild("Humanoid") local torso = char:WaitForChild("Torso") local function onDied() for _,v in pairs(char:GetChildren()) do if v:IsA("Tool") then if v.RequiresHandle and v.CanBeDropped and v:FindFirstChild("Handle") then v.Parent = workspace end break end end for _,v in pairs(backpack:GetChildren()) do if v:IsA("Tool") and v.RequiresHandle and v.CanBeDropped then local handle = v:FindFirstChild("Handle") if handle then v.Parent = workspace handle.CFrame = torso.CFrame end end end end humanoid.Died:connect(onDied) end if player.Character and player.Character:IsDescendantOf(workspace) then onCharacterAdded(player.Character) end player.CharacterAdded:connect(onCharacterAdded) end for _,v in pairs(game.Players:GetPlayers()) do onPlayerAdded(v) end game.Players.PlayerAdded:connect(onPlayerAdded)
Spxders
#185910314Wednesday, March 23, 2016 8:12 PM GMT

Ill try both.
TimeTicks
#185914120Wednesday, March 23, 2016 9:22 PM GMT

Jesus clonetrooper...why would you ever write that many lines of code? game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() for i,v in next, char:GetChildren() do if v:IsA("Tool") then v.Parent = workspace v.Handle.CFrame = char.Torso.CFrame end end end) end) end)
Lua_Basics
#185914552Wednesday, March 23, 2016 9:29 PM GMT

[rfa#hidefromsearch]
#185914916Wednesday, March 23, 2016 9:35 PM GMT

[rfa#hidefromsearch]
TimeTicks
#185915140Wednesday, March 23, 2016 9:38 PM GMT

@Above no its not
Spxders
#185918815Wednesday, March 23, 2016 10:33 PM GMT

Guys, When the player doesnt have the tool equipeed it doesnt drop, Is there a way to do this.
Notwal
#185918981Wednesday, March 23, 2016 10:36 PM GMT

This had better not have anything to do with minecraft.... please let it be something original. ץ๏ย ς๏ยl๔ภ't ђคภ๔lє ๓є єשєภ เŦ เ ςค๓є ฬเtђ เภรtгยςtเ๏ภร.
Spxders
#185919746Wednesday, March 23, 2016 10:49 PM GMT

icekiller8002
#185920098Wednesday, March 23, 2016 10:55 PM GMT

i made something like this a while back, and i made a model of it: WARNING: TRASHY OLD SCRIPTS http://www.roblox.com/Drop-tools-on-death-item?id=386749238 ┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴ hello kids
icekiller8002
#185920669Wednesday, March 23, 2016 11:04 PM GMT

did my model help? ┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴ hello kids
Spxders
#185921880Wednesday, March 23, 2016 11:24 PM GMT

let me see
Spxders
#185921956Wednesday, March 23, 2016 11:26 PM GMT

no, Do i have to put it in gui?
icekiller8002
#185921980Wednesday, March 23, 2016 11:26 PM GMT

ye ┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴ hello kids
Spxders
#185922235Wednesday, March 23, 2016 11:31 PM GMT

YESSS ICEKILLER KISSS ME UR SO GOOD ehem, I mean thank you.
icekiller8002
#185922332Wednesday, March 23, 2016 11:33 PM GMT

i'm surprised it still works after all of these months because i used many old school methods for scripting :P and you're welcome ┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴ hello kids
CloneTrooper1019
#185925202Thursday, March 24, 2016 12:18 AM GMT

@TimeTicks Its just a persistent style I follow.

    of     1