How do I make ragdoll on death work on dummies

So I’m kind of struggling on making this ragdoll on death script work for dummies/Load Character imported avatars in game

i tried making it work on dummies and failed so I’m seeking for help

here is the script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		char.Humanoid.Died:Connect(function()

			local char_Items = char:GetChildren()
			

			for i, v in pairs(char_Items) do
				if v:IsA("Part") or v:IsA("MeshPart") then
					v.CanCollide = true
					v.Anchored = false
				end
			end
			
			local NeckAtt1 = Instance.new("Attachment")
			NeckAtt1.CFrame = CFrame.new(0, -0.5, 0)
			NeckAtt1.Parent = char.Head

			local LeftLegAtt1 = Instance.new("Attachment")
			LeftLegAtt1.CFrame = CFrame.new(0, 1, -0)
			LeftLegAtt1.Parent = char["Left Leg"]

			local RightLegAtt1 = Instance.new("Attachment")
			RightLegAtt1.CFrame = CFrame.new(0, 1, -0)
			RightLegAtt1.Parent = char["Right Leg"]

			local LeftArmAtt1 = char["Left Arm"].LeftShoulderAttachment
			local RightArmAtt1 = char["Right Arm"].RightShoulderAttachment

			local TorsoLeftArm0 = Instance.new("Attachment")
			TorsoLeftArm0.CFrame = CFrame.new(-1.5, 1, 0)
			TorsoLeftArm0.Parent = char.Torso

			local TorsoRightArm0 = Instance.new("Attachment")
			TorsoRightArm0.CFrame = CFrame.new(1.5, 1, 0)
			TorsoRightArm0.Parent = char.Torso

			local TorsoLeftLeg0 = Instance.new("Attachment")
			TorsoLeftLeg0.CFrame = CFrame.new(-0.5, -1, 0)
			TorsoLeftLeg0.Parent = char.Torso

			local TorsoRightLeg0 = Instance.new("Attachment")
			TorsoRightLeg0.CFrame = CFrame.new(0.5, -1, 0)
			TorsoRightLeg0.Parent = char.Torso

			local TorsoNeck0 = Instance.new("Attachment")
			TorsoNeck0.CFrame = CFrame.new(0, 1, 0)
			TorsoNeck0.Parent = char.Torso

			local BSJ_LA = Instance.new("BallSocketConstraint")
			BSJ_LA.Parent = char.Torso
			BSJ_LA.Attachment0 = TorsoLeftArm0
			BSJ_LA.Attachment1 = LeftArmAtt1
			BSJ_LA.LimitsEnabled = true
			BSJ_LA.TwistLimitsEnabled = true
			BSJ_LA.UpperAngle = 130
			BSJ_LA.TwistLowerAngle = -70
			BSJ_LA.TwistUpperAngle = 70
			local BSJ_RA = Instance.new("BallSocketConstraint")
			BSJ_RA.Parent = char.Torso
			BSJ_RA.Attachment0 = TorsoRightArm0
			BSJ_RA.Attachment1 = RightArmAtt1
			BSJ_RA.LimitsEnabled = true
			BSJ_RA.TwistLimitsEnabled = true
			BSJ_RA.UpperAngle = 130
			BSJ_RA.TwistLowerAngle = -70
			BSJ_RA.TwistUpperAngle = 70
			local BSJ_LL = Instance.new("BallSocketConstraint")
			BSJ_LL.Parent = char.Torso
			BSJ_LL.Attachment0 = TorsoLeftLeg0
			BSJ_LL.Attachment1 = LeftLegAtt1
			BSJ_LL.LimitsEnabled = true
			BSJ_LL.TwistLimitsEnabled = true
			BSJ_LL.UpperAngle = 130
			BSJ_LL.TwistLowerAngle = -30
			BSJ_LL.TwistUpperAngle = 30
			local BSJ_RL = Instance.new("BallSocketConstraint")
			BSJ_RL.Parent = char.Torso
			BSJ_RL.Attachment0 = TorsoRightLeg0
			BSJ_RL.Attachment1 = RightLegAtt1
			BSJ_RL.LimitsEnabled = true
			BSJ_RL.TwistLimitsEnabled = true
			BSJ_RL.UpperAngle = 130
			BSJ_RL.TwistLowerAngle = -30
			BSJ_RL.TwistUpperAngle = 30
			local BSJ_N = Instance.new("BallSocketConstraint")
			BSJ_N.Parent = char.Torso
			BSJ_N.Attachment0 = TorsoNeck0
			BSJ_N.Attachment1 = NeckAtt1
			BSJ_N.LimitsEnabled = true
			BSJ_N.TwistLimitsEnabled = true
			BSJ_N.UpperAngle = 130
			BSJ_N.TwistLowerAngle = -50
			BSJ_N.TwistUpperAngle = 50
			

			
			char.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(5, 20, 10)
			char.Head.AssemblyLinearVelocity = Vector3.new(5, 5, 10)
			char["Left Arm"].AssemblyLinearVelocity = Vector3.new(5, 5, 10)
			char["Right Arm"].AssemblyLinearVelocity = Vector3.new(5, 5, 10)
			char["Left Leg"].AssemblyLinearVelocity = Vector3.new(5, 5, 10)
			char["Right Leg"].AssemblyLinearVelocity = Vector3.new(5, 5, 10)
		end)
	end)
end)

It’s placed in ServerScriptService

2 Likes

copy all whats under CharacterAdded and put it in a script inside the dummy
obviously change char.Humanoid to script.Parent:WaitForChild(‘Humanoid’)

1 Like

Thank you so much it worked. :heart: :pray:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.