Cloned Player Doesn't Load Animations

So I am trying to acheive a feature where your character gets cloned, but the current state of the character is how the clone would look. For instance, if you cloned while walking, your clone would stand still in a walking pose. I have tried to do this with the :Clone() function but as seen in the following video, it does not work as I expected and the clone ends up having no animation at all on it.

I know it’s possible to do so if you simply just replicate the animation data to the clone but I want to know a way as easy as just copying and pasting the individual parts

3 Likes

could you loop through the players character and set each corrosponding joint to the C1 and C0?

image

2 Likes

image
it’s an animation. they’re all empty

2 Likes

I’m pretty sure you can do this by setting the Transform property of every Motor6D in your dummies to be equal to the corresponding one in your character. This should freeze the rig at the exact point the animation is in.

This looks something like this:

    for _, motor in pairs(DummyCharacter:GetDescendants()) do
        if motor:IsA("Motor6D") then
            local characterMotor = YourCharacter:FindFirstChild(motor.Name, true)
           
            if characterMotor then
                motor.Transform = characterMotor.Transform 
            end
        end
    end
1 Like

it’s been 6 hours trying to do this. thank’s mate! :saluting_face:

I am trying to make it run every frame. It seems to have a small delay when I do it though. This causes no animation to occur unless i put it in RunService.PreAnimation.


Even when I do that, it acts weird.
Same exact thing happened when I tried another method which is getting the current animation, pausing it, and setting the TimePosition from the Animator. Any help on that?

Heres the video when i put it at RenderStepped.
So even when I do that, no animation at all

i also realized that while testing the script you gave me, it works after a split second or like a frame probably. This is what interrupts the viewmodel i’m showing you, which updates every frame.

1 Like

Yeah that’s weird behavior, it’s hard to say what’s causing it from just the video. Can I take a look at the code for applying the motor6d changes and for rendering the view model?

1 Like

I used the code in the solution. It has a small delay that doesn’t work with the system I’m trying to create.

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