Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Ok so i need a ragdoll script (by pressing "R" prefererably?

OK so i don't know how to make a good script at all and i need a press R to go ragdoll script ive tried other peoples scripts and they don't work is there any easy script i can have or you tell me how to make it? thanks for reading answers are appreciated!

2 comments

0

do you even script brah?

0

nah brah

3 answers

✓ Accepted answer

Dangit, I'm late to the party!

https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053/13

local died
died = character.Humanoid.Died:Connect(function()
	local d = character:GetDescendants()
	for i=1,#d do
		local desc = d[i]
		if desc:IsA("Motor6D") then
			local socket = Instance.new("BallSocketConstraint")
			local part0 = desc.Part0
			local joint_name = desc.Name
			local attachment0 = desc.Parent:FindFirstChild(joint_name.."Attachment") or desc.Parent:FindFirstChild(joint_name.."RigAttachment")
			local attachment1 = part0:FindFirstChild(joint_name.."Attachment") or part0:FindFirstChild(joint_name.."RigAttachment")
			if attachment0 and attachment1 then
				socket.Attachment0, socket.Attachment1 = attachment0, attachment1
				socket.Parent = desc.Parent
				desc:Destroy()
			end	
		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.