Animation not working correctly!

Hey Everyone,
I’m making a game similar to piggy, and I’ve just made my character.
I’m having issues with the animation though!
The head animates, but the legs don’t.
My character is in startercharacter, and I have a script in ServerScriptService with this inside of it:

local Players = game:GetService("Players")
 
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
 
	for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
		playingTracks:Stop(0)
	end
 
	local animateScript = character:WaitForChild("Animate")
	animateScript.run.RunAnim.AnimationId = "https://www.roblox.com/library/5450570964/Teddy-Run"        -- Run
	animateScript.walk.WalkAnim.AnimationId = "https://www.roblox.com/library/5450570964/Teddy-Run"      -- Walk
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://616161997"      -- Jump
	animateScript.idle.Animation1.AnimationId = "rbxassetid://616158929"    -- Idle (Variation 1)
	animateScript.idle.Animation2.AnimationId = "rbxassetid://616160636"    -- Idle (Variation 2)
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://616157476"      -- Fall
	animateScript.swim.Swim.AnimationId = "rbxassetid://616165109"          -- Swim (Active)
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655"  -- Swim (Idle)
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119"    -- Climb
end
 
local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

My animation looks like this in the animation editor.

https://gyazo.com/7dc53b8321f69c1c62fff729dbf1d6fe

Here’s what it looks like in play test mode:

https://gyazo.com/f0e0ab3d55b7bbe71ac1333f6a5a6090

How can I fix this? The humanoid hip height is set to 5.5.

I don’t get any errors!!!

Instead of using the URL for the running and walking animations, use the asset IDs

It didn’t work…

Edit: I went into my character when the game was running, went into the walk and run anims, and the ids were different! Then I changed them from the server and the legs moved! But in the script it’s changing the same things so I don’t get it!
@JollyGameCrazy

I’ve tried this method before but failed, I don’t think it’s possible to manipulate character animations like this.

Is there any way? Should I just make a sever script in the character?

What I do is, disable the ‘Animate’ script and load my animations, and whenever the player does an action the corresponding animation will play.

I watched a video for it, and they did it my way and it worked for them.

Nevermind, I just re-made the script my way rather than using it from the Wiki:

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(char)
		if char then
			local Animate = char:WaitForChild('Animate')
			Animate.walk.WalkAnim.AnimationId = 'rbxassetid://5450570964'
			Animate.run.RunAnim.AnimationId = 'rbxassetid://5450570964'
			
		end
	end)
end)

you sure you have the animation priority on walking and not action?

I just SAID that It’s solved so why are you commenting on it?