game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
Character.Humanoid.Died:Connect(function(hit)
local cln = Character:Clone()
cln.Parent = workspace
Character:Remove()
game.Debris:AddItem(cln,10)
end)
end)
end)

line 5
cln.Parent = workspace
To clone a Character, you need to set its Archivable
property to true
first.
Therefore, the revised version of your code would be:
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
Character.Humanoid.Died:Connect(function(hit)
Character.Archivable = true
local cln = Character:Clone()
cln.Parent = workspace
Character:Remove()
game.Debris:AddItem(cln,10)
end)
end)
end)
2 Likes
system
(system)
Closed
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.