Choppy Animation Fix

Hi, so I’m making a startercharacter with a built in weapon model with animations I made myself. I’ve copied and pasted the “animate” script into startercharacter scripts. I don’t have the most animating knowledge

I think this is a scripting issue because the animation from the animation editor looks smooth and to my liking. I’ve also tried to change the animation priority to core and to action.

I’ve replaced the running, walking, idle, falling animations with ones of my own. The issue is with the walking animation which for a split second snaps back to a static position. I will paste the script and 2 videos of the animations below:

-- humanoidAnimateR15Moods.lua

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local pose = "Standing"

local userNoUpdateOnLoopSuccess, userNoUpdateOnLoopValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop") end)
local userNoUpdateOnLoop = userNoUpdateOnLoopSuccess and userNoUpdateOnLoopValue

local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end)
local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue

local function getRigScale()
	if userAnimateScaleRun then
		return Character:GetScale()
	else
		return 1
	end
end

local AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent")
local HumanoidHipHeight = 2

local EMOTE_TRANSITION_TIME = 0.1

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0

local runAnimTrack = nil
local runAnimKeyframeHandler = nil

local PreloadedAnims = {}

local animTable = {}
local animNames = { 
	idle = 	{	
		{ id = "http://www.roblox.com/asset/?id=17833723576", weight = 1 },
		{ id = "http://www.roblox.com/asset/?id=17833723576", weight = 1 },
		{ id = "http://www.roblox.com/asset/?id=17833723576", weight = 9 }
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=17833329725", weight = 10 } 
			}, 
	run = 	{
				{ id = "http://www.roblox.com/asset/?id=17833329725", weight = 10 } 
			}, 
	swim = 	{
				{ id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } 
			}, 
	swimidle = 	{
				{ id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } 
			}, 
	fall = 	{
		{ id = "http://www.roblox.com/asset/?id=17833329725", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=522635514", weight = 10 } 
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=522638767", weight = 10 } 
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=507770239", weight = 10 } 
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=507770453", weight = 10 } 
			},
	dance = {
				{ id = "http://www.roblox.com/asset/?id=507771019", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507771955", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507772104", weight = 10 } 
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=507776043", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507776720", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507776879", weight = 10 } 
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=507777268", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507777451", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507777623", weight = 10 } 
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=507770818", weight = 10 } 
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=507770677", weight = 10 } 
			},
}


I wont be able to answer back immediatly because I have to be somewhere

from what i’m seeing, roblox just doesn’t load in the next animation fast enough, so it chops to the vanilla animations, then to your animation

i can’t really think of anything else

Hate to be that person, but is this a server or local script?

Hi! So to answer your question, the script is a local script placed into StarterCharacterScripts.

@notsad2 Was correct as I tested this with a different animation, that animation played smoothly. This might just be a bug on my end.

If anyone else suffers from the same issue. I resorted to changing the animation ids with the following local script in the startercharacterscripts:

(PS. I changed the avatar from R15 to R6 for designer choices which im not sure if it may have played any role in this issue)

local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://[ID-HERE]"
for _, x in char.Animate.idle:GetChildren() do
	if x:IsA("Animation") then
		x.AnimationId = "rbxassetid://[ID-HERE]"
	end
end

So far I’ve only edited the walking + idle animations but will change the falling animations etc. too, I will mark notsad2 as the solution.

i don’t necessarily think this is a bug as i struggle with this whenever i have new animations aswell

my code typically looks like this:

animation1.Stopped:Wait()
-- load anim2
animation2:Play() -- this won't load fast enough since it's a new animation and will "chop", this goes away with time (atleast from my experience)

i do use R6 so i guess that could also make a difference
but if that issue still persists then idk!!!

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