I am attempting to clone the player’s character as soon as it loads in order to create scenery featuring the clone.
This is what my avatar looks like and what the clone looks like:
And here is the code I wrote
game.Players.PlayerAdded:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
wait(char)
char.Archivable = true
local clone = char:Clone()
clone.Parent = game.Workspace
clone:WaitForChild("Animate"):Destroy()
clone:WaitForChild("Health"):Destroy()
clone:SetPrimaryPartCFrame(CFrame.new(7, -6.5, -8.5))
local hum2 = clone:WaitForChild("Humanoid")
local lean2 = hum2:LoadAnimation(script.LeanR6)
lean2:Play()
end)