How would I go about making a ragdoll when a player reaches a certain velocity?

the title is pretty self explanatory, for example when the player’s velocity reaches over 500 they go into ragdoll (so when they fall or get moved using BodyVelocity or something and their Velocity exceeds a certain amount they go into ragdoll)

  • Server Script (ServerScriptService) - Does velocity checks. If a player exceeds a certain velocity, it ragdolls him.

https://developer.roblox.com/en-us/api-reference/property/BasePart/Velocity
https://developer.roblox.com/en-us/api-reference/event/Humanoid/Ragdoll

Get the velocity of the HMR/Torso of the character, then if it exceeds a certain value change their humanoid state type to ragdoll.