Custom Walking Animation has a start Delay

I’ve got a custom rig that I made an animation for, but every time I start walking, there’s a small delay before the walking animation starts. Does anyone have a fix?

Link to video:

Server script in StarterCharacterScripts:

local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local walkAnim = script:WaitForChild("Walk")
local walkTrack = hum:WaitForChild("Animator"):LoadAnimation(walkAnim)

hum.Running:Connect(function(speed)
	if speed > 0 and speed < 11 then
		if not walkTrack.IsPlaying then
			walkTrack:Play()
		end
	elseif speed > 11 then
		if not walkTrack.IsPlaying then
			walkTrack:Play()
		end
	else
		if walkTrack.IsPlaying then
			walkTrack:Stop()
		end
	end
end)

bump, i need an answer to this question as soon as possible

Are you using a server script?, if you are copy and paste the script inside a local script instead.

Yes, I’m using a server script. If I use a local script, doesn’t that mean nobody else will see the walking animation?

No, if you play animation local scripts, roblox allows it to show to everyone.
That’s why the animate script inside our characters is a local script, so there is no delays.

1 Like

Not for the character. This explains it well.

A quick copy and paste or a plugin to change the scirpt into a LocalScript should solve your problem.

Nevermind, it seems to have been a problem with how I made the animation (one of the keyframes was left blank intentionally, though I figured out that the blank keyframe made it look like there was a delay).

1 Like

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