Rope uncoil animation (Animation not completing or finishing length?)

I am attempting to have a rope uncoil animation play to the point of a rope becoming completely untangled.
The animation within the default Roblox plugin plays the desired way, as seen in this gif.

This animation was produced with the default Roblox animator.
This animation has a length of:

The issue appears when playing the animation with code

Here is the code in question:

local RopePackage = script.Parent
local SkinnedMeshAnimations = RopePackage.SkinnedMeshAnimations
local animationRopeWrapped = SkinnedMeshAnimations.RopeWrapped
local animationRopeUnwrapped = SkinnedMeshAnimations.RopeUnwrapped

local AnimationController = RopePackage.AnimationController
local Animator = AnimationController.Animator

local animationTrack1 = Animator:LoadAnimation(animationRopeWrapped)
local animationTrack2 = Animator:LoadAnimation(animationRopeUnwrapped)

function checkFreezeAnimationAtPercent(animationTrack, percentagePosition)
	local timePos = animationTrack.TimePosition / animationTrack.Length
	if timePos >= percentagePosition then

if animationTrack1 then
if animationTrack2 then

Connection = RunService.Stepped:Connect(function()
	checkFreezeAnimationAtPercent(animationTrack2, .99)

Where RopePackage is a model instance that looks like this:

Where RopeWrapped and RopeUnwrapped are of the Animation class with the respective Id

This code creates a runtime that looks like this:
rope unravel

Without the function checkFreezeAnimationAtPercent The animation looks like this:
rope unravel without stop

Intimal thoughts were figuring out why there was a discrepancy between the length that the default Roblox animator said it was, vs what reading the code via Animaiton.Length

If I print the length it is given as:

This created a discrepancy from 1.19 to 1.633. This makes me wonder if the animation uploaded with seemingly two different lengths, or how that could have happened.

The issue can’t be with checkFreezeAnimationAtPercent as even without running that code, the animation restarts sooner than the supposed ending.

There is no code messing with the animation thereafter the snippet shown in this post.

Any ideas on the nature of animations on Roblox are appreciated, thank you.


It’s a little confusing, but the scrubber time in the editor is second:frame. So your animation length is 1 + (19 frames / 30 FPS) = 1.63 seconds. I’m not as keen on the playback issue, but I’m willing to troubleshoot if you post/message me the model with the KeyframeSequence.

Edit: The first animation was interfering with the second. For future thread viewers, the solution was to stop the first before playing the second, but there may be an equivalent fix involving animation priority.


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