game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
local tool = character:FindFirstChildWhichIsA("Tool")
if tool then
local clone = tool:Clone()
player.CharacterAdded:wait()
clone.Parent = player.Character
end
end)
end)
end)
But when i respawned after die tool is in hand but without animation need equip again and after work.
Someone can repair code to working tool clone?
Do you not have somewhere where all of the tools the player has is stored and whether they are equipped or not? If so, you could just have a character added event and equip all of the tools that have their equipped bool set to true.