You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to make the animation pause at a specific time for the keyframe so like when the player holds a key, it will be at certain pose until it lets go.For example,holding F key to block.
What is the issue? Include screenshots / videos if possible!
My animation doesn’t pause at the right timing, like I make the animation play first then after waiting 0.25 seconds it should pause at that pose.But it doesn’t pause at the right timing, as it sometimes pauses too early or too late.I have put 0.25 seconds because I saw in moon animator plugin that the keyframe is at 0.25 seconds.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried asking people or seeing solutions and tried adjusting time but it didn’t fix.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local a = Instance.new("Animation",Char.Humanoid)
a.AnimationId = "rbxassetid://6962735082"
local al = Char:WaitForChild("Humanoid").Animator:LoadAnimation(a)
al:Play(0)
wait(.25)
al:AdjustSpeed(0)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
Let me show you something that the animation property has, (Unsure of the name, I think it’s AdjustWeight.) but it allows you to smoothly tween an animation from nothing, to a pose, Such as blocking.
For this, we can do something like this:
-- When player tries to block here:
animation:Play(0.5) -- The number defines how long it takes for the animation
-- to actually go to the idle form.
Try using this with a basic block pose, then using the 0.5 to tween it! This also works with:
Sorry for the late reply, but it doesn’t really help with issue, it might because I’m doing it wrong.But wiht your solution even if I do play(0.25) or stop (0.25), it doesn’t go smoothly.What I want is for the animation to run as normal but then pause at the certain timeframe which is basically like a blocking pose, and make it stay idle on that pose until the player lets go.
Wait() is highly unreliable and is known for firing a few frames later than it should that’s the reason why custom wait solutions exist. You should probably use one of these as they can usually half the extra time caused by wait.
This gif shows charging, I want my script to do something like that animation, I want it to play the animation and then pause the animation at the certain time frame so it will be like a idle form.
I’ve often suspected this. I could even suspect task.wait() of being inexact when I wait 95% (eg 1.5s) of an animation out and then it’s sheer luck whether the next animation track continues smoothly from this, or, as sometimes happens (1 in 5 chance, say), an idle animation, or something, I don’t what, I’ve tried neutralizing idles, interrupts and attempts to rotate a prone character upright for a few frames.
Can you please link to further evidence that wait, or task.wait are (highly) “unreliable”? Did task.wait fix this?
wait is unreliable by-design, it will throttle if the task scheduler has too much to do. task.wait would fix this issue however did not exist as of the time of me writing a reply to this topic. To note, task.wait is still one heartbeat delayed.