Ragdoll flying issue

Nope, it just keeps on flying. And I feel like this is still my error.

2 Likes

Let me see the full behaviour of this ragdoll. This might take time.

2 Likes

I have tried this in baseplate, everything works fine and character ragdolls as he should. I’ve noticed that this scrpt doesn’t work with R6.
I think that this affects only your game. Try to find anything that interacts with character in any way.

1 Like

That doesn’t make sense, everything was normal without the ragdoll and it only flings you into the air when you ragdoll.

2 Likes

I think that the tool is the cause for this. Try to save your tool to a file, open a baseplate, insert an R15 rig (plugins tab → rig builder), insert your tool into starter pack and see if it still flies.

2 Likes

I inserted the ragdoll script in a random baseplate without the weapon and called it on the character when the player is added and it still flies.

Here are both scripts if needed.

Server:

game.ReplicatedStorage.Remotes.Ragdoll.OnServerEvent:Connect(function(p,char)
	local d = char: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	
			local new = Instance.new("BodyVelocity")
			new.Velocity = Vector3.new(0,-100,0)
			new.Parent = char.HumanoidRootPart
		end
	end
end)

Client:

local p = game.Players.LocalPlayer
game.ReplicatedStorage.Remotes.Ragdoll:FireServer(p.Character)
game.ReplicatedStorage.Remotes.Killed.OnClientEvent:Connect(function(player)
    game.SoundService.SoundEffects.Kill:Play()
    game.ReplicatedStorage.Remotes.Ragdoll:FireServer(player.Character)
end)
3 Likes

Bruh. It also happened to me. Thirty characters.

1 Like

You’re getting launched into the air as well?

2 Likes

Should I move this post to #platform-feedback:engine-bugs?

1 Like

I found the fix. When character ragdolls, his Humanoid.HipHeight is 2. Setting it to 0 descends you back.

5 Likes

Thank you, but why is the camera like that? Is there anyway to fix it? Also, I’ve used this same script before and I’ve never needed to do that.

2 Likes

Camera always follows HumanoidRootPart, which doesn’t have a constraint. A constraint that connects HumanoidRootPart.RootRigAttachment with UpperTorso.WaistRigAttachment will fix the character being dragged around.

2 Likes

Not sure what you mean, I’m just saying that the camera is slightly off.

2 Likes

Err… Post the updated script please. I’ve put char.Humanoid.HipHeight = 0 at the end, which causes my character to drag around.

2 Likes
game.ReplicatedStorage.Remotes.Ragdoll.OnServerEvent:Connect(function(p,char)
	char.Humanoid.HipHeight = 0
	local d = char: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	
			local new = Instance.new("BodyVelocity")
			new.Velocity = Vector3.new(0,-100,0)
			new.Parent = char.HumanoidRootPart
		end
	end
end)
2 Likes

workspace.CurrentCamera.CameraSubject = p.Character.Headon client’s side will make the camera focus on character’s head.

1 Like

I’ve also noticed that this script creates 15 BodyVelocity objects, which isn’t quite good.

1 Like

I’ve noticed that you get dragged along the floor, any way to fix this?

1 Like

I got dragged around the floor because I removed all BodyVelocities. Adding at least one with enough force will fix it.

1 Like

Probably late, but I realized that this is what happens when the Humanoid is trying to stand up. What you should do is enable Platform standing when the character dies/goes ragdoll.

5 Likes