Ragdoll grapple not working

I am trying to make a Ragdoll grappling hook but I don’t know which Ragdoll script for r6 and how to activate the ragdoll when the tool click is held.

I tried a few R6 ragdoll scripts but none of them worked. I tried searching for answers but nothing.

Here is the Grapple Tool ModuleScript:

local RunService = game:GetService(“RunService”)
local Players = game:GetService(“Players”)
local TweenService = game:GetService(“TweenService”)

local tool = script.Parent
local base = tool:WaitForChild(“Base”)
local spring = base.Spring
local hook = tool:WaitForChild(“Hook”)
local hookWeld = hook.HookWeld
local hookReference = tool:WaitForChild(“HookReference”)
local messageEvent = script:WaitForChild(“MessageEvent”)
local activated = script:WaitForChild(“Activated”)

–ONLY CLIENT
local player = nil
local mouse = nil
local currentTween = nil

local GrappleGun = {}

local function toggleHumanoidGrappleState(active)
local humanoid = player.Character and player.Character:FindFirstChild(“Humanoid”)

if humanoid then

  if active then 
  	humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
  	humanoid:ChangeState(Enum.HumanoidStateType.Physics)
  else 
  	humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, true)
  	humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
  end

end
end

local function clientInit()
player = Players.LocalPlayer
mouse = player:GetMouse()

mouse.TargetFilter = player.Character

tool.Activated:Connect(function()
if not GrappleGun.IsActivated() and mouse.Target then
messageEvent:FireServer(true, mouse.Hit.Position)
toggleHumanoidGrappleState(true)
end
end)

tool.Deactivated:Connect(function()
messageEvent:FireServer(false)
toggleHumanoidGrappleState(false)
end)

tool.Unequipped:Connect(function()
messageEvent:FireServer(false)
toggleHumanoidGrappleState(false)
end)

end

local function serverInit()

messageEvent.OnServerEvent:Connect(function(player, _activated, targetPosition)
activated.Value = _activated

  if GrappleGun.IsActivated() then 
  	GrappleGun.Fire(targetPosition)
  else 
  	GrappleGun.Reset()
  end

end)

end

local function init()
if RunService:IsClient() then
clientInit()
elseif RunService:IsServer() then
serverInit()
end
end

function GrappleGun.IsActivated()
return activated.Value
end

function GrappleGun.Fire(targetPosition)
local initalPos = hookReference.Position

local distance = (targetPosition - initalPos).Magnitude

hookWeld.Enabled = false
hook.Anchored = true

wait()

hook.Position = targetPosition
spring.FreeLength = distance

local info = TweenInfo.new(distance/100, Enum.EasingStyle.Linear)
local tween = TweenService:Create(spring, info, {FreeLength = 1})

tween:Play()

currentTween = tween
end

function GrappleGun.Reset()
if currentTween then
currentTween:Cancel()
end

hook.CFrame = hookReference.CFrame
hookWeld.Enabled = true
hook.Anchored = false

spring.FreeLength = 1
end

init()
return GrappleGun