------Morphing Bug

Hi, I’m trying to make a big statue of a dummy transform into a player’s character when the player joins. It doesn’t work though as it gives the error: Players.Chickennuggetmanwow.PlayerScripts.LocalMap:11: attempt to index nil with 'WaitForChild' - Client

And without waiting for child:

 Players.Chickennuggetmanwow.PlayerScripts.LocalMap:13: attempt to index nil with 'SetPrimaryPartCFrame'  -  Client

Here’s my code:

local Players = game:GetService("Players")
local Player = game:GetService("Players").LocalPlayer

local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local Statue = workspace.Statue.Char

function StatueAppearance()
	local CharacterMorph = Character:Clone()

	
	CharacterMorph:SetPrimaryPartCFrame(Statue.PrimaryPart.CFrame)
	
	Statue.Character = CharacterMorph
	CharacterMorph.Parent = workspace
end

StatueAppearance()

Also another issue is in the editor, the dummy is fine, but when I load the game it’s body parts spread out and get tiny. Anybody know how to fix any of this? Thanks, ahead of time.

SetPrimaryPartCFrame has been superseded by PVInstance:PivotTo().

Thanks for the info, but it still doesn’t work. It just gives the same error but with PivotTo.

You can’t clone the character because its Archivable is set to false automatically, making it unable to be cloned.

To clone the character, you wanna set its Archivable to true and clone it before setting it back to false.

Now it says it can’t find the character of the statue.