I’m trying to clone the players character through a local script and still have the animations work, for example the idle and walking animation.
My code so far is simple, but I have tried many ways to get it to work but every time the cloned character just stands there with no animations. Below is the basic code used to clone the player.
local rolePlace = workspace.RevealRole
local targetDummy = rolePlace.Player
local playerCharacter = player.Character or player.CharacterAdded:Wait()
local clonedCharacter = playerCharacter:Clone()
local dummyRoot = targetDummy:FindFirstChild("HumanoidRootPart")
local clonedRoot = clonedCharacter:FindFirstChild("HumanoidRootPart")
clonedRoot.CFrame = dummyRoot.CFrame
clonedCharacter.Head.NicknameGui:Destroy()
clonedCharacter.Parent = workspace.RevealRole
clonedCharacter.Name = "PlayerDummy"
targetDummy:Destroy()
Thanks!