I attempted to make the player who steps on the script's Parent (a Part in workspace) go into the HumanoidStateType.Ragdoll. Here's the script:
script.Parent.Touched:Connect(function(part) local parent = part.Parent local human = parent:FindFirstChild("Humanoid") if human then human:ChangeState(Enum.HumanoidStateType.Ragdoll) end end)
The script doesn't work, even when using a repeat wait()... until method
You can only change states with a local script
. If you want to force a state, you'll need to keep changing it.
game:GetService('RunService').RenderStepped:Connect(function() Humanoid:ChangeState('Swimming') end)
I've recently used Tom_atoes Ragdoll script, it works great especially if you know how it works: https://devforum.roblox.com/t/tom-atoes-customisable-ragdoll/259927
This property released a while back. Many developers in the comments posted their code for it, you can use it: https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053