how do i make when people die they drop all there tools?
also when drop tools i want to be able to pick it up when i click on them or just step on them
thanks for reading not much but small
Put this in a server script service
Make a script.
Code:
game.Players.PlayerAdded:connect(function(Player) -- use the PlayerAdded event to get the Player Player.CharacterAdded:connect(function(Character) -- use the CharacterAdded event to get the character local hum = Character:FindFirstChild("Humanoid") -- get the Humanoid local torso = Character:FindFirstChild("Torso") -- get the torso hum.Died:connect(function() -- when the Humanoid.Health = 0 for I, tool in pairs(Player.Backpack:GetChildren()) do tool.Handle.Position = CFrame.new(torso.Position.X + math.random(0, 5), torso.Position.Y + math.random(0,5), torso.Position.Z + math.random(0,5)) -- places them near Players position tool.Parent = Workspace -- adds the tool to the workspace end end) end) end)