You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve?
A functioning ragdoll script
- What is the issue?
Hi, this is my first post on the devforum. Hopefully this on the right topic. This is my first ragdoll script; when I reset, my body parts go crazy. I don’t know how to fix this or what I can do to fix it. The script is in startercharacterscripts.
- What solutions have you tried so far?
I talked to people on a scripting helpers discord and they said to change the humanoidstatetype but it didn’t work
local char = script.Parent
char.Humanoid.BreakJointsOnDeath = false
char.Humanoid.Died:Connect(function()
char.Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
for _,v in pairs(char:GetDescendants()) do
if v:IsA("Motor6D") then
local ballsocketconstraint = Instance.new("BallSocketConstraint",v.Parent)
ballsocketconstraint.LimitsEnabled = true
local attachment0 = Instance.new("Attachment",v.Part0)
attachment0.Name = "Attachment0"
local attatchment1 = Instance.new("Attachment",v.Part1)
attatchment1.Name = "Attachment1"
ballsocketconstraint.Attachment0 = attachment0
ballsocketconstraint.Attachment1 = attatchment1
v:Destroy()
end
end
end)