Ragdoll flings when dragged

I want the enemy to ragdoll when its hit and be dragged with the attack but after ragdolling it just flings

enemy is the player/npc that touched the hitbox and its supposed to be dragged to the hitbox untill the attack ends

	if enemy.Stats.IsBlocking == false then
		ehum:TakeDamage(0.2) --enemy humanoid
		ragdoll.ragdoll(enemy) --module
		dragToPosition(enemy, hitbox.Position)
	end

set them in a ragdoll state (assuming you have a script for this), then apply vectorvelocity on an LinearVelocity instance that is attached to the hit NPCs rootpart, based on the CFrame lookvector of the attacker, you could try to make the velocity relative to the world too.

i forgot to add the dragToPosition function

local function dragToPosition(target, position)
	if not target or not target:FindFirstChild("HumanoidRootPart") then return end

	local rootPart = target.HumanoidRootPart

	local dragAttachment = rootPart:FindFirstChild("DragAttachment") or Instance.new("Attachment")
	dragAttachment.Name = "DragAttachment"
	dragAttachment.Parent = rootPart

	local alignPos = Instance.new("AlignPosition")
	alignPos.ApplyAtCenterOfMass = true
	alignPos.MaxForce = math.huge
	alignPos.Responsiveness = 100000 
	alignPos.RigidityEnabled = false 
	alignPos.Mode = Enum.PositionAlignmentMode.OneAttachment
	alignPos.Position = position 
	alignPos.Attachment0 = dragAttachment
	alignPos.Parent = rootPart

--	dragAttachment.Position	 = position
	local alignOri = Instance.new("AlignOrientation")
	alignOri.MaxTorque = 4000
	alignOri.Responsiveness = 100
	alignOri.Attachment0 = dragAttachment
	alignOri.Parent = rootPart
	
	game:GetService("Debris"):AddItem(alignPos, 0.2)
	game:GetService("Debris"):AddItem(alignOri, 0.1)
	game:GetService("Debris"):AddItem(dragAttachment, 0.2)
end

im not too certain what align orientations do as i havent really used them, but if you wanted them to stay standing while still ragdolled you could try giving network ownership to the hitter and disabling a few of the characters motor6ds, and creating attachments between the leg joints to keep them standing