Hey there everyone! I was wondering how can I achieve the smoothesttransition possible between an Animation and a CFrame?
Basically imagine playing an Equip Animation and when a Tool reaches your LeftHand (When Animation Ends), set the CFrame of that Tool in a RenderStep to the LeftHand!
I tried doing this, but it makes a jitter effect in that transition and that is possibly because of the frame in RunService. I have also tried Heartbeat, Stepped and RenderStepped, but none of them make that smooth transition.
Does anyone have experience with this? If so, please share your knowledge here! If you have any suggestions or ideas please reply! Anything helps!
Have you tried adding an event to your animation? Here’s this tutorial:
Once you’ve added your animation event to your animation, you can use the function AnimationTrack:GetMarkerReachedSignal() to make a connection to the event.
Would look something like this:
local animation = script.Animation
local animationTrack = animator:LoadAnimation(animation)
animationTrack:GetMarkerReachedSignal("EquipEvent"):Connect(function()
-- add code to cframe sword here
end)
I could try, but it seems that whenever I set the CFrame of the tool, it will always spawn at the center of my character and then set the CFrame. That’s what makes the jitter effect.
Ohhh okay, in that case you should make sure that the Motor6D connected to the UpperTorso is disabled, then make a new Motor6D/Weld to the arm to attach the weapon to the arm. That one should be enabled then disabled/deleted once unequipped. The weapon must be non-collide to stop the physics engine from doing anything to the character.
Does that mean I shouldn’t set the CFrame, because If I set the CFrame it will position it correctly to the LeftHand and I won’t be using RunService, because WeldConstraint will do the job, but whenever I set the CFrame it still makes the jitter effect, if I don’t set it, then it will float my Bow on my head!
I’ve tried both methods you’ve told me, but none of them make a good transition, whenever I set the CFrame, it just creates that jitter effect. I need to set the CFrame, so my bow can be positioned correctly!
I managed to catch that frame when, the jitter happens.