AnimationTrack:AdjustSpeed(0) Is not working for me

  1. I want to freeze the Animation track at the end of the Animation

  2. When I do that it doesn’t stop and it complete the animation somehow

  3. I searched in the devforum and Developerhub and didn’t find solution yet

Here is the scripter

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")


function freezeAnimationAtTime(animationTrack, timePosition)
	print("Working")
	-- Set the speed to 0 to freeze the animation
	animationTrack:AdjustSpeed(0)
	animationTrack:Play() 
	-- Jump to the desired TimePosition
	animationTrack.TimePosition =0.09
	
end

-- Create new "Animation" instance
local kickAnimation = Instance.new("Animation")
-- Set its "AnimationId" to the corresponding animation asset ID
kickAnimation.AnimationId = "rbxassetid://10244776244"

-- Load animation onto the animator
local kickAnimationTrack = animator:LoadAnimation(kickAnimation)

wait(5)
-- Play animation track
freezeAnimationAtTime(kickAnimationTrack,0)

3 Likes

have you tried adjusting the speed after playing the animation track

3 Likes