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?