Cloning Player does not work

I am trying to clone my player character for a singleplayer game, but I always get this error when trying to run the code,

ServerScriptService.LoadScripts.LoadGame:37: attempt to index nil with 'Name'

The portion of the code I’m using can be found below:

local char = game.Workspace:WaitForChild(plr.Name)

local charClone = char:Clone()

print(charClone)

charClone.Name = “PlayerCharacterCutsceneClone”

charClone.Parent = ReplicatedStorage

What would I have to do to fix this code?

1 Like

Set Archivable to true before cloning.
char.Archivable = true

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