Can you make a ragdoll system for a custom character that does not have the same body parts as the regular roblox avatar?
2 Likes
What do you mean by ragdoll system? Do you mean like making the character lose all control and just fall down?
1 Like
This alone may help you
-- Turn into loose body:
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
But there is a complete rag-doll script in some of these models:
Mod them to your liking…
1 Like
Yes, that is exactly what I mean.
1 Like
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.BreakJointsOnDeath = false
local function OnHumanoidDied()
for _, Part in ipairs(Character:GetChildren()) do
if Part:IsA("BasePart") then
local Motor6D = Part:FindFirstChildWhichIsA("Motor6D")
if Motor6D then
if Part.Name ~= "Head" then
local BallSocket = Instance.new("BallSocketConstraint")
local Attachment1 = Instance.new("Attachment")
local Attachment2 = Instance.new("Attachment")
Attachment1.CFrame = Motor6D.C0
Attachment2.CFrame = Motor6D.C1
Attachment1.Parent = Motor6D.Part0
Attachment2.Parent = Motor6D.Part1
BallSocket.Attachment0 = Attachment1
BallSocket.Attachment1 = Attachment2
BallSocket.Parent = Motor6D.Parent
Motor6D:Destroy()
elseif Part.Name == "Head" then
local WeldConstraint = Instance.new("WeldConstraint")
WeldConstraint.Part0 = Motor6D.Part0
WeldConstraint.Part1 = Motor6D.Part1
WeldConstraint.Parent = Motor6D.Parent
end
end
end
end
end
Humanoid.Died:Connect(OnHumanoidDied)
Compatible with R15 avatars only.
2 Likes
I’m not sure if there is a way to do this.
I’m pretty sure you will have to stick to the normal body parts.
1 Like
So if I used the same parts of an r15 I could do it?
Yeah, if you did that then i’m sure it will work.
Do you know one that is for r6 models?
I just got done with the video and typed it out but it still doesn’t work for me, I have double-checked and I still don’t know what is wrong.