My problem is quite simple but i’m having a lot of difficulty solving.
-
I want to clone the player that dies and create a clone of it in workspace.
-
The issue is, every time I try to create a clone of the character; It says that it’s
nil
which I know isn’t true due to the character model still being in the workspace and the script inside the player; -
I’ve attempted rescripting the entire thing to the same error, I’ve tried calling it from a script outside of the player… leads to the same result.
More Photos
The photo is of my name being printed on line 13, the error, with what line errors; which is line 15.
Script
--local Ragdoll = require(game.ServerScriptService["Modules | Ragdoll"].RagdollModule)
local RS = game:GetService("RunService")
local Char = script.Parent
local Hum = Char.Humanoid
local CharName = Char.Name
Char.Humanoid.BreakJointsOnDeath = false
Char.Humanoid.RequiresNeck = false
Ragdoll.RagdollFunctions["Build Rig"].Function(Char)
Hum.Died:Connect(function()
--if Ragdoll.Settings.Toggles.DeathRagdoll then
--Ragdoll.RagdollFunctions["Activate Ragdoll"].Function(Char)
print(Char.Name)
local CharClone = game.Workspace[CharName]:Clone()
CharClone.Parent = workspace
CharClone.Name = CharName.." Ragdoll Clone"
CharClone.Parent = workspace
--Ragdoll.RagdollFunctions["Activate Ragdoll"].Function()
wait(5)
CharClone:Destroy()
--end
end)
Thank you for any help you can give me.