Animation for custom character not working

I made a custom character, a mech, which should play the idle and walk animation but none of that is happening, any reason why?
robloxapp-20220228-2329392

scrpit:

local humanoid = character:WaitForChild("Humanoid")


local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid.Animator:LoadAnimation(walkAnim)
local idleAnim = script:WaitForChild("Idle")
local idleAnimTrack = humanoid.Animator:LoadAnimation(idleAnim)

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)

humanoid.Running:Connect(function(speed)
	if speed == 0 then
		idleAnimTrack:Play()
		end
end)

Is this a LocalScript or Script? Also have you tried playing animation simply without calculating speed and stuff to confirm if that rig is welded properly?

I tried removing all the scripts but the normal animations didnt load in, i just move stuck together

I tried removing all the scripts but the normal animations didnt load in, i just moved around stuck together.

and its also a local script. plus all animations are mine, cant even get normal roblox anims to load in

Well, i think the issue is mainly with the rig you are currently using as your character so are you sure those animations can work on it?

i mean the rig is welded properly so idk why the anims dont work