Why does walk animation freeze when i change it mid game?

When i change my stat from “None” to “Grabbed” (Stat is just a string value im changing so i can detect if i have a person on me or not) I change my walk animation from normal walk to “Walk While Holding”, but it doesnt loop correctly.

Code:

local walkanim =  Animate.walk.WalkAnim.AnimationId
local idleanim =  Animate.idle.Animation1.AnimationId

local holdingwalk = "rbxassetid://15396200969"
local idlehold = "rbxassetid://15396207346"

styleValue.Changed:Connect(function(a)
	if a == "None" then
		Animate.idle.Animation1.AnimationId = idleanim
		Animate.walk.WalkAnim.AnimationId = walkanim

	elseif a == "Grabbed" then
		Animate.idle.Animation1.AnimationId = idlehold
		Animate.walk.WalkAnim.AnimationId = holdingwalk

	end
end)