Sprinting Script Animation Not Playing

I am trying to script a sprinting script with animations. To get the animations, I chose to edit the default roblox Animate value to the animation I want. This strategy works in R6 but not R15. The animation is R15, I have made sure of that.

if input.KeyCode == Enum.KeyCode.LeftControl and collection:HasTag(hum, "Sprinting") == false then
		
		collection:AddTag(hum, "Sprinting")
		character:FindFirstChild("Animate").run.RunAnim.AnimationId = "rbxassetid://5442218732"
		_G.runAnim = "http://www.roblox.com/asset/?id=5442218732"
		hum.WalkSpeed = 0
		wait()
		hum.WalkSpeed = 25
		
	elseif input.KeyCode == Enum.KeyCode.LeftControl and collection:HasTag(hum, "Sprinting") then
		
		collection:RemoveTag(hum, "Sprinting")
		character:FindFirstChild("Animate").run.RunAnim.AnimationId = "rbxassetid://5442183357"
		_G.runAnim = "http://www.roblox.com/asset/?id=5442183357"
		hum.WalkSpeed = 0
		wait()
		hum.WalkSpeed = 16
		
	end

The following code is in a user input service, input began event which is in a local script in StarterPack. I know I should use remotes to make this a bit more secure as well as a sanity check with the remote, however, I wanted to keep everything in 1 place for this question so currently its all in 1 local script. The _G.runAnim is a variable that defines the value of the run animation id from the animate script. I do know that the animation id does indeed change in the animation track object within the Animate script but it still doesn’t function for some reason. Thanks to all answers in advance.

is your animation priority at the max it can be? also did you check to make sure your animation isnt erroring when it plays

Weight is at 10 yes, as I’m just changing the value of the Animate script that roblox defaults and I customized. The animation isn’t erroring when it plays.

arent weight and priority different? Priority determines if it plays over other animations and is set via enums, Weight is just a float

Oh. But there are no other animations playing at the time in the first place so I wouldn’t think priority matters in this situation. All that I really did was replace existing values for the player’s Animate script.

where is the animation saved?

30char

do u know if runanim is even used in the animation script? it may be a better idea to change the walk anim id

It is used and played, I’ve tested it out and run is used. For some reason, it’s the default for when you’re walking instead of walk.

The animation isn’t saved at all as I’m updating the existing roblox default Animate script.

I checked priority and the priority on the sprinting animation was higher then the priority on the normal walking animation.