My custom starter character, Helsho, is not changing his speed when I change my StarterPlayer. Here is the code for his animation.
local cas = game:GetService("ContextActionService")
local char = script.Parent
local humanoid = char:WaitForChild("Humanoid")
local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid.Animator:LoadAnimation(walkAnim)
humanoid.Running:Connect(function(speed)
if speed > 0 then
if not walkAnimTrack.IsPlaying then
walkAnimTrack:Play()
end
else
if walkAnimTrack.IsPlaying then
walkAnimTrack:Stop()
end
end
end)
I hope this helps.