Whenever the player jumps they just get out of ragdoll
local UserInputService = game:GetService("UserInputService")
local RagdollRemote = game.ReplicatedStorage:WaitForChild("RagdollRemote")
local IsRagdolled = false
local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChild("Humanoid")
UserInputService.InputBegan:Connect(function(Input,GameProcessedEvent)
if not GameProcessedEvent and Input.KeyCode == Enum.KeyCode.R then
print("Ragdoll")
if IsRagdolled == true then
IsRagdolled = false
RagdollRemote:FireServer(false)
Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
else
IsRagdolled = true
RagdollRemote:FireServer(true)
Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
end
end
end)``