I was scripting this tool in which when the player dies, it clones the player and leaves it on the floor as if it was a dead body. But so far, it only gets past the cloning stage. I get multiple errors like " 'player' is not a valid member of workspace' and 'Humanoid is not a valid member of model.'
PlayerList = {}
game.Players.PlayerAdded:connect(function(player)
table.insert(PlayerList, player.Name)
player.Archivable = true
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
print(player.character.Name)
print(player.Name)
local toolclones = game.Workspace[player.Name]
toolclones.Archivable = true
toolclones:Clone().Parent = game.Workspace
if toolclones == nil then
toolclones.Name = player.Name.."-Dead"
end
toolclones:WaitForChild("Humanoid")
toolclones.Archivable = true
toolclones.Humanoid = Enum.HumanoidDisplayDistanceType.None
toolclones.Humanoid = Enum.HumanoidStateType.Seated
toolclones.Humanoid.AutoJumpEnabled = false
end)
end)
end)
- Is it possible to rename a humanoid that is cloned?
- Why is the humanoid and the model refusing to pick up at times?
Thanks.
