This is what I tried to make but failed:
--I located the character so no worries. char.Humanoid.Died:connect(function() local plr = game.Players:GetPlayerFromCharacter(char) for i,v in pairs(plr.Backpack:GetChildren()) do v.Handle.Position = char.HumanoidRootPart.Position --Sad face v.Parent = workspace end end)
The thing here is that I want the player to drop everything he/she has in their backpack. But Positioning the Handle won't help. Neither is positioning the whole tool because there is no function for that. Any help?
I’m not sure if there is a simpler way, but you could try putting each tool inside a model that you position at the character, and then moving the tool back outside the model once it’s been positioned.
char:WaitForChild("Humanoid").Died:Connect(function() local plr = game.Players:GetPlayerFromCharacter(char) for _,tool in pairs(plr.Backpack:GetChildren()) do if tool:IsA("Tool") and tool:FindFirstChild("Handle") then local positionModel = Instance.new("Model") tool.Parent = positionModel positionModel.PrimaryPart = tool.Handle positionModel:MoveTo(char.HumanoidRootPart.Position) tool.Parent = workspace positionModel:Destroy() -- re-welding my be required here end end end)
I've found a really nice way to do it on my own.
But thanks for the help! I'll accept your answer