Help with character and attachments

While my character has ragdoll applied and gets pivoted somewhere, the movement becomes unresponsive for about an second.
ragdoll script below:

Module.Check = function(t)
	for _,v in pairs({"LeftWrist","RightWrist","LeftAnkle","RightAnkle"}) do
		if v == t then return false end
	end
	return true
end
Module.Joints = function(c)
	c.Humanoid.BreakJointsOnDeath = false
	c.Humanoid.RequiresNeck = false
	for _,v in pairs(c:GetDescendants()) do
		if v:IsA("Motor6D")and Module.Check(v.Name)then
			local b = Instance.new("BallSocketConstraint",v.Parent)
			local a0,a1 = Instance.new("Attachment"),Instance.new("Attachment")
			a0.Parent,a1.Parent = v.Part0,v.Part1
			b.Attachment0,b.Attachment1 = a0,a1
			a0.CFrame,a1.CFrame = v.c0,v.c1
			b.TwistUpperAngle = 0
			b.TwistLowerAngle = 0
		
			b.LimitsEnabled = true
			b.TwistLimitsEnabled = true
			b.Enabled = false
		elseif v:IsA'BasePart' then
			v.CollisionGroup = ("A")
			if v.Name == "HumanoidRootPart" then
				v.CollisionGroup = ("B")
			elseif v.Name=="Head"then
				v.CanCollide = true
			end
		end
	end
end
plrs.Character:PivotTo(CFrame.new(SpawnPoint.Position.X,SpawnPoint.Position.Y + SpawnPoint.Size.Y/2 + HRP.Size.Y/2,SpawnPoint.Position.Z))

also how could you make it so that the player’s parts don’t spin around when they are still with these constraints.