How do I make a Knockback Ragdoll?

I want to make my final punch of my m1 combo to be a strong punch that knockbacks and ragdolls the enemy, then the enemy gets up 1 or two seconds later.

if Count ~= nil then
			FrameWork.Sound(game.ReplicatedStorage.Sounds.Hit:WaitForChild("Punch"..Count),{Parent = EnemyChar.HumanoidRootPart},2)
			if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
				FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil"..Count),EnemyChar.Humanoid)
				if EnemyChar:FindFirstChild("Blocking") == nil then
					EnemyChar.HumanoidRootPart.CFrame = CFrame.new(EnemyChar.HumanoidRootPart.Position,MainChar.HumanoidRootPart.Position)
				end
				if Count < 5 then
					FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 30},.05)
				elseif Count == 5 then
					FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 50},.2)
                   -- the part where i want it to ragdoll  and get back up a second or two later (Knockback is already the bodyvelocity)
				end
			end
			if game.Players:FindFirstChild(MainChar.Name) ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(MainChar.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"]:FindFirstChild("Hit") ~= nil then
				game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"].Hit.Value += 1
			end
			EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
		end
		if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
			local HitEffect = game.ReplicatedStorage.Effects.HitEffect:WaitForChild("HitEffect"):Clone()
			HitEffect.Parent = EnemyChar.HumanoidRootPart
			_G.Debris(HitEffect,2)
			for i,v in pairs(HitEffect:GetChildren()) do
				if v:IsA("ParticleEmitter") then
					v:Emit(v:GetAttribute("EmitCount"))
				end
			end
		end

You can see I put a comment statement in the script so you will know.
How would I make a Knockback Ragdoll?

4 Likes

Try Using :ApplyImpulse(Vector3).

1 Like

I don’t know how that would work…

https://developer.roblox.com/en-us/api-reference/function/BasePart/ApplyImpulse

1 Like

can u give me an example of using it?

Try this, mess with the values for your desired result.

local AdditionalForce = 2000
local HumanoidRootPart = EnemyChar:WaitForChild("HumanoidRootPart);
HumanoidRootPart:ApplyImpulse(Vector3.new(HumanoidRootPart.AssemblyMass * AdditionalForce, 0, 0)) -- takes Vector3(x, y, z)
1 Like

You could have just searched on how to make kb and ragdoll:

2 Likes

What about the ragdoll then get back up in a second or two?
The knockback is already done, the bodyvelocity line as you can see is the knockback.

Ragdoll effect can just be added right after kb, wait 2 seconds and just disable it. If you were to make it simple, just set the humanoid’s sit to true and false.

1 Like

I don’t know how to add a good r6 ragdoll after the knockback.
I’ve tried one ragdoll method which is r6 from youtube, How to Get R6 Ragdoll in Roblox Studio!! - YouTube.
But the thing is, when an NPC enemy gets knockbacked and ragdolls, their torso just glitches and it looks like the torso is getting up while the rest of the limbs are ragdolled, then a while later the whole body gets back up.

Im also having this problem with my knockback, this thread is relatively old, so I’m wondering if you’ve found a fix already?

I recommend this ragdoll script by @Aspecky