Clone not working on character even after setting archivable to false

player.Character.Archivable = false;
for index, desc in pairs(player.Character:GetDescendants()) do
	if desc.Archivable ~= nil then
		desc.Archivable = false;
	end
end

local tries = 0;
repeat task.wait()
	local success, errormessage = pcall(function()
		player.Character:Clone().Parent = objects;
	end)
	
	tries += 1;
	print("try " .. tries);
until success

If you’re looking to clone a player’s character, you are supposed to set the Archivable value to true, not false. This only needs to be set on the character itself, and not on the descendants.
Here is an example:

player.Character.Archivable = true
player.Character:Clone().Parent = objects

If you have any objects inside the character that also need archivable set to true, you can do that as well.

player.Character.Archivable = true
for index, desc in pairs(player.Character:GetDescendants()) do
	if desc:IsA("BasePart") then
		desc.Archivable = true;
	end
end

the reason I was setting it to false is because it wasn’t working either with true

Is there any specific error you are getting?
Try to print the error message on your function.

script:
repeat task.wait() until game.Players.LocalPlayer.Character;

local char = game.Players.LocalPlayer.Character:Clone();

char.Parent = backpackMenu.ViewportFrame

error:
Players.TheBeastMare.PlayerGui.UI.Controller:481: attempt to index nil with ‘Parent’

You didn’t set your character’s Archivable value to true.

repeat task.wait() until game.Players.LocalPlayer.Character;

game.Players.LocalPlayer.Character.Archivable = true -- You have to include this for your character to be cloned.
local char = game.Players.LocalPlayer.Character:Clone();
char.Parent = backpackMenu.ViewportFrame

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.