Player spazzing out when deleting legs, my only other idea doesn't work

--add crippled legs
				function addLeg(leg, vector)
					local newLeg = game.ServerStorage.brokenLeg:Clone()
					newLeg.CFrame = leg.CFrame
					script.Parent:FindFirstChild(leg.Name):Destroy()
					newLeg.Parent = script.Parent
					local attachment = Instance.new("Attachment")
					attachment.Parent = script.Parent.Torso
					attachment.Position = vector
					newLeg.BallSocketConstraint.Attachment1 = attachment
				end
				addLeg(script.Parent["Left Leg"], Vector3.new(-.5, -1, 0))
				addLeg(script.Parent["Right Leg"], Vector3.new(.5, -1, 0))

Upon taking enough fall damage, your legs break, and you’re crippled. This is good. The problem is that when I delete the legs (if it matters, I’m using a custom crawling animation for when you’re crippled) the body just spazzes out, animations restarting constantly and being all janky. It isn’t the animation- I’ve tried it all without removing the legs, and it works fine.
My other idea was to make the legs transparent, so there’s no jank, but it still looks the same.
Contrary to what I expected, this is 100x times more jank, I literally just start flying.

What should I do?

Okay so let’s trouble shoot where the issue is.

  • Delete the legs, see if the issue persists
  • Use a different animation, see if the issue persists