The ragdoll works as intended on dummies, however torsos on players are unaffected by ragdolls and they sort of float in the air as the other limbs ragdoll around.
I’ve tried setting the network ownership to the server to no avail.
function Module.Knockback(Player, Character, Velocity)
local HRP = Player.Character.HumanoidRootPart
--Character.HumanoidRootPart:ApplyImpulse(HRP.CFrame.LookVector * Velocity)
local Vel = Instance.new("BodyVelocity")
Vel.MaxForce = Vector3.one*math.huge
Vel.Velocity = HRP.CFrame.LookVector * Velocity
Vel.P = 100
Vel.Parent = Character.HumanoidRootPart
task.delay(0.1, function()
Vel:Destroy()
end)
end
function Module.Ragdoll(Character, Time)
if not Character:FindFirstChild("RagdollConstraints") then
ragdoll:Setup(Character)
end
ragdoll:Ragdoll(Character)
task.delay(Time, function()
ragdoll:Unragdoll(Character)
end)
end
These are the two functions I am using to achieve this. Keep in mind everything is done server-side.
The ragdoll module I am using is this one: Smooth R6 Ragdoll for Players and NPCs (Plug-and-Play) with no changes made to it