Cloning instance not working

	local corpse = character:Clone()
	corpse.Parent = game.Workspace
	corpse:PivotTo(humanoidRootPart.CFrame)

trying to create a working death effect which spawns a “clone” of the character. script is placed in startercharacterscripts but doesnt clone and says nil, nobody can get it to work

“trying to index nil (Cloned Model) with parent”

Make sure your Character’s Archivable property is set to true before doing this. Your client can’t clone or replicate Instances that have that property disabled.

Edit: You can do this on the server or on the client. Here’s an example of it being used.

try

local corpse = character:GetDescendants()
for i,v in pairs(corpsseItems) do
local newModel = Instance.new(“Model”)
newModel.Parenet = workspace
newModel.PrimaryPart = script.Parent:WaitForChild(“HumanoidRootPart”)
newModel.Name = “corpse” --change to ur liking
v.Parent = game.Workspace.corpse
v:PivotTo(humanoidRootPart.CFrame)
end

im not that good

after cleaning up it doesnt work and before cleaning up it doesnt work either.

“newModel.Parenet = workspace” … excuse me what? PARENET!!!