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
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
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.
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?