Ragdoll flies up into the sky unintended

I have a downed system where you can revive and carry players however when you carry a player and die it glitches out the system so I made it so if you die and are carrying a player the carried player will no longer be carried anymore.

This works great however the ragdoll bugs out as a result - It either stands up and you are able to walk, or it floats and flies away.

I have tried everything setting humanoid states, etc but nothing seems to work.

			local FindCarriedPlayer = workspace:FindFirstChild(Carrying.Value)

			if FindCarriedPlayer then
				warn(FindCarriedPlayer.Name)
				local FindCarriedPlayerHRP = FindCarriedPlayer:WaitForChild("HumanoidRootPart")

				local CarryPosition = FindCarriedPlayerHRP:FindFirstChild("CarryPosition")

				if CarryPosition then
					CarryPosition:Destroy()
				end

				local AlignOrientation = FindCarriedPlayerHRP:FindFirstChild("Align_PlayerOrientation")

				if AlignOrientation then
					AlignOrientation:Destroy()
				end

				local CarryAttachment0 = humanoidRootPart:FindFirstChild("CarryAttachment0")

				if CarryAttachment0 then
					CarryAttachment0:Destroy()
				end
				
				enableCollisions(FindCarriedPlayer)
			end

Seems to be a state issue. Have you tried forcing the ragdoll to be a state such as platform standing or ragdoll?

You haven’t used any sort of physics constraints right?

The module I am using already does this when the player is ragdolled.

[Updated] Perfect R6 Ragdoll - Easiest Ragdoll System for R6 Avatars - Resources / Community Resources - Developer Forum | Roblox

The carrying system may be interfering with it. Have you tried looking for any state changes?

Not sure what the module uses but I am sure most likely not.

No. I could try and debug to see if any state changes.


That’s interesting.

1 Like

Why would state changes apply a force to the character?

(I’m not doubting you - just very curious!)

It seems to vary between Freefall, Running, and GettingUp when I try to set the humanoid state to Ragdoll and even when I try to disable these states it just wouldn’t budge I even tried Network Ownership.

The module uses BallSocketConstraints.

1 Like

If you were to remove a ragdoll’s M6D’s or at least disable them, they’d become CanCollided and thus the character will be able to stand on them. Since they’re linked via BallSocketConstraints, they’ll constantly follow the character and cause a flying motion. This only happens in states such as running though.

Edit: Noticed that the code above disables the motors, proves my point a bit lol.

2 Likes

hello! amazing job on the system. its incredible.

i dont have much experience in this line of systems but u could do:

if the player who is carrying the other player dies then the carried player’s character could be welded to the baseplate or make a part and have them welded to that. that’s probably a “knock off” way of doing it but if it were me id want a better solution. but its just an idea anyways :slight_smile:

Do you have any ideas on how to prevent this besides dealing with humanoid states? (I think I found a solution hold on)

I found a solution however now there’s a different problem.

When you revive the player that died and was carrying the player they just automatically get downed and bleed out quicker.

	maid[player.Name.."HealthChanged"] = humanoid:GetPropertyChangedSignal("Health"):Connect(function()
		if humanoid.Health > previousHealth then previousHealth = humanoid.Health return end
		previousHealth = humanoid.Health
		
		if IsDowned.Value == false then
			local HealthLostHighlight = Instance.new("Highlight")
			HealthLostHighlight.Name = "HealthLostHighlight"
			HealthLostHighlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
			HealthLostHighlight.FillColor = Color3.new(1, 1, 1)
			HealthLostHighlight.OutlineColor = Color3.new(1, 1, 1)
			HealthLostHighlight.FillTransparency = 0.5
			HealthLostHighlight.OutlineTransparency = 0
			HealthLostHighlight.Parent = character

			local percent = Health.Value / humanoid.MaxHealth

			local OutlineColorTween = TweenService:Create(HealthLostHighlight, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {OutlineColor = RED:Lerp(GREEN, percent)})
			OutlineColorTween:Play()

			local FillColorTween = TweenService:Create(HealthLostHighlight, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {FillColor = RED:Lerp(GREEN, percent)})
			FillColorTween:Play()

			FillColorTween.Completed:Once(function()
				local OutlineTransparencyTween = TweenService:Create(HealthLostHighlight, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {OutlineTransparency = 1})
				OutlineTransparencyTween:Play()

				local FillTransparencyTween = TweenService:Create(HealthLostHighlight, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {FillTransparency = 1})
				FillTransparencyTween:Play()

				FillTransparencyTween.Completed:Once(function()
					HealthLostHighlight:Destroy()
				end)
			end)
		end
		
		local HealthLoss = (humanoid.MaxHealth - humanoid.Health)
		
		if HealthLoss > 0 then
			humanoid.Health += HealthLoss
			Health.Value -= HealthLoss
		end
		
		if Health.Value <= 0 then
			Health.Value = 0
		end
		
		if Health.Value <= 0 and IsDowned.Value == false then
			Health.Value = 0
			IsDowned.Value = true
			
			warn("how the hell")
			
			if Carrying.Value ~= "" then
				local FindCarriedPlayer = workspace:FindFirstChild(Carrying.Value)

				if FindCarriedPlayer then
					warn(FindCarriedPlayer.Name)
					local FindCarriedPlayerHumanoid : Humanoid = FindCarriedPlayer:WaitForChild("Humanoid")
					local FindCarriedPlayerHRP = FindCarriedPlayer:WaitForChild("HumanoidRootPart")

					local CarryPosition = FindCarriedPlayerHRP:FindFirstChild("CarryPosition")

					if CarryPosition then
						CarryPosition:Destroy()
					end

					local AlignOrientation = FindCarriedPlayerHRP:FindFirstChild("Align_PlayerOrientation")

					if AlignOrientation then
						AlignOrientation:Destroy()
					end

					local CarryAttachment0 = humanoidRootPart:FindFirstChild("CarryAttachment0")

					if CarryAttachment0 then
						CarryAttachment0:Destroy()
					end

					enableCollisions(FindCarriedPlayer)
					
					FindCarriedPlayerHumanoid.PlatformStand = true
					
					Carrying.Value = ""
					
					
				end
			end
			
			local RevivePrompt = Instance.new("ProximityPrompt")
			RevivePrompt.Exclusivity = Enum.ProximityPromptExclusivity.AlwaysShow
			RevivePrompt.Name = "RevivePrompt"
			RevivePrompt.Style = Enum.ProximityPromptStyle.Custom
			RevivePrompt.HoldDuration = 0.5
			RevivePrompt.RequiresLineOfSight = false
			RevivePrompt.ActionText = "Revive "..player.Name
			RevivePrompt.ObjectText = "Administer CPR"
			RevivePrompt.Parent = character
			
			local CarryPrompt = Instance.new("ProximityPrompt")
			RevivePrompt.Exclusivity = Enum.ProximityPromptExclusivity.AlwaysShow
			CarryPrompt.Name = "CarryPrompt"
			CarryPrompt.UIOffset = Vector2.new(0, 40)
			CarryPrompt.Style = Enum.ProximityPromptStyle.Custom
			CarryPrompt.KeyboardKeyCode = Enum.KeyCode.Q
			CarryPrompt.HoldDuration = 1
			CarryPrompt.RequiresLineOfSight = false
			CarryPrompt.ActionText = "Carry "..player.Name
			CarryPrompt.Parent = character
			
			local CheckIfBloodAmountExists = humanoidRootPart:FindFirstChild("BloodAmount")
			
			if CheckIfBloodAmountExists then
				CheckIfBloodAmountExists:Destroy()
			end
			
			local BloodAmountClone = BloodAmount:Clone()
			BloodAmountClone.Adornee = humanoidRootPart
			BloodAmountClone.Parent = humanoidRootPart
			
			CarryEvent:FireClient(player, BloodAmountClone, false)
			
			maid[player.Name.."RevivePrompt"] = RevivePrompt.Triggered:Connect(function()
				Blood.Value += AMOUNT_OF_BLOOD_TO_REGEN
				
				if Blood.Value >= 300 then
					IsRagdoll.Value = false
					IsDowned.Value = false
					
					humanoid.PlatformStand = false
					
					maid[player.Name.."RevivePrompt"] = nil
					
					RevivePrompt:Destroy()
					CarryPrompt:Destroy()
					
					Threads[player.Name.."BloodLossThread"] = nil
					
					Blood.Value = 300
					Health.Value = 50
					
					local DownedHighlight : Highlight = character:FindFirstChild("DownedHighlight")
					
					if DownedHighlight then
						DownedHighlight:Destroy()
					end
					
					coroutine.wrap(function()
						task.wait(RESPAWN_TIME / 2)
						
						for _, v in pairs(BloodAmountClone:GetDescendants()) do
							if v:IsA("Frame") then
								TweenService:Create(v, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundTransparency = 1}):Play()
							elseif v:IsA("TextLabel") then
								TweenService:Create(v, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {TextTransparency = 1}):Play()
							end
						end
						
						task.wait(0.5)
						
						BloodAmountClone:Destroy()
					end)()
				end
			end)

Don’t know how I am going to solve this I will probably make a different post for this.

1 Like

I would say there’s probably a variable or something that you forgot to disable.

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