Help With Character Can't Cloned

i am trying when a player joins the game it will put him in a table and then make a check for if character exists and after that i want to clone his character to a floder on workspace

for some reason its not cloning it please help me with that i appreciate your help :smiley:

local PlayersService = game:GetService("Players")
local Players = {}

function CloneCharacter(player)
	Players = PlayersService:GetPlayers()
	for i, v in pairs(Players) do
		if player.Name == v.Name then
			local Character = player.Character
			if Character then
				--This Mean That Found The Character
				local ClonedCharacter = Character:Clone()
				ClonedCharacter.Parent = workspace:FindFirstChild("ClonedCharacters")
				print("Cloned Successfully")
			else
				print("Character not found")
			end
		end
	end
end

game.Players.PlayerAdded:Connect(function(plr)
	wait(5)
	CloneCharacter(plr)
	
end)

error: β€œ12: attempt to index nil with β€˜Parent’”

Its because the Characters Archivable property is set to false as default, set it to true then try cloning it.

1 Like

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