-- Ragdoll for 3 seconds and then get back up
Character.InteractiveRagdoll.ToggleRagdoll.Value = true
task.wait(3)
Character.InteractiveRagdoll.ToggleRagdoll.Value = false
If you want the function version
-- Timed ragdoll function
function TimedRagdoll(ragdollTime: number)
Character.InteractiveRagdoll.ToggleRagdoll.Value = true
task.wait(ragdollTime)
Character.InteractiveRagdoll.ToggleRagdoll.Value = false
end
-- Usage
TimedRagdoll(3)
function Knockback(Character: Model, direction: Vector3, ragdollTime: number)
--You can use AssemblyLinearVelocity, BodyVelocity or LinearVelocity
Character.InteractiveRagdoll.ToggleRagdoll.Value = true -- ragdoll on
Character.HumanoidRootPart.AssemblyLinearVelocity = direction -- knockback
task.wait(ragdollTime) -- wait ragdolltime
Character.InteractiveRagdoll.ToggleRagdoll.Value = false -- ragdoll off
end
-- get our target (person we want to apply knockback)
local target = workspace.Target
-- get our dealer (the person doing the knockback)
local dealer = workspace.Dealer
-- Calculate the direction from the start to target, (target - start).Unit
local direction = (target.HumanoidRootPart.Position - dealer.HumanoidRootPart.Position).Unit
local strength = 40 -- how powerful their knockback is
Knockback(target, direction * strength, 3) -- apply the knockback on the target
You can use BodyMovers, which are listed below. In the code I shown, I used AssemblyLinearVelocity.
Does this work with the new Character Controllers provided by Roblox if the character’s an R6? Releasing Character Physics Controllers - #272 by Varonex_0 I’ve been searching for a solution to ragdolls with the character controllers for ages
Thanks for the resources but I was already using body velocity. Don’t know if it’s because I’m replicating to the client or something, but it just doesn’t seem to work. (EDIT - Replicating onto the client seems to be the issue)
Not sure, I’m currently remaking the module so it’s easier to use and way better. It most likely will be done today or tmrw. I’m almost done, I just have to finish replication things.
Messing with collision groups seems to do something. I discovered that the ragdoll only works when rigs with the Character tag cannot collide, which is a shame because I am working on a fighting game where character collisions are pretty crucial.
If the remake of your module allows us to have character collisions - then hooray! But for now, I’ll stick to other ragdoll solutions.