local q=script.Parent:WaitForChild("\072\117\109\097\110\111\105\100")q.BreakJointsOnDeath=false q.Died:Connect(function()for q,U in pairs(script.Parent:GetDescendants())do if U:IsA("\077\111\116\111\114\054\068")then local q=Instance.new("\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116")local Q=Instance.new("\065\116\116\097\099\104\109\101\110\116")local T=Instance.new("\065\116\116\097\099\104\109\101\110\116")Q.Parent=U.Part0 T.Parent=U.Part1 q.Parent=U.Parent q.Attachment0=Q q.Attachment1=T Q.CFrame=U.C0 T.CFrame=U.C1 q.LimitsEnabled=true q.TwistLimitsEnabled=true U:Destroy()end end end)
--put on startercharacterscripts
--made this from a tutorial
--i'll take this as not mine cause i dont know how to script and this was from a tutorial
local humanoid = script.Parent:WaitForChild("Humanoid")

humanoid.BreakJointsOnDeath = false

humanoid.Died:Connect(function()
	for index, joint in pairs(script.Parent:GetDescendants()) do
		if joint:IsA("Motor6D") then
			local socket = Instance.new("BallSocketConstraint")
			local a1 = Instance.new("Attachment")
			local a2 = Instance.new("Attachment")
			a1.Parent = joint.Part0
			a2.Parent = joint.Part1
			socket.Parent = joint.Parent
			socket.Attachment0 = a1
			socket.Attachment1 = a2
			a1.CFrame = joint.C0
			a2.CFrame = joint.C1
			socket.LimitsEnabled = true
			socket.TwistLimitsEnabled = true
			joint:Destroy()
		end
	end
end)
