Weird cut at the end of animation

Here’s how it looks :
https://gyazo.com/3ee692db11ec4952130978767cda43f6

And here is how it should look :
https://gyazo.com/44fed8641aadb596f0a2aac82ef7e0d2

Basically at the end of the loop it seems like the torso and arms go into a position, but the legs are not affected. The animation is on loop and is set to “movement” priority. I used the basic animate script from roblox.

Make sure to put first frame at position 0 and make sure last frame matches the first one.

After a while I figured that the problem came from the fact that not every body part is set during the first frame. In the roblox animation editor, it looks fine if the frame is set later in the animation but apparently it breaks in game. Anyways, it’s hard to explain but at least it works fine now.

thats why you should try animating on blender