I want to make a ragdoll carry system for my game, but I am encountering some physics interference.
I assume what’s happening is that the player getting carried is messing with the player carrying by offsetting the later’s center of mass to tipping territory and also by the constant bumping coming from the carried player’s limbs.
How can I fix this? I tried making the carried player as massless as the game engine allows but that doesn’t seem to help. Any help is appreciated.
Not sure why, but that was the funniest video I have seen all week
What you could do is just loop through the character and set all parts to massless = true
Example:
local makeCharacterMassless = function(character)
for _, part in pairs(character) do
if part.ClassName == 'Part' or 'MeshPart' or 'Union' then
part.Massless = true
end
end
end
I haven’t tested this script, although it should work. It’s just a concept. Please let me know if this helps!
Ah, I see. Are you looking through the character and setting every part to mass less or just one? And for these things I recommend using RopeConstraints.
Massless property doesn’t actually set the mass of the BasePart to 0, it sets it to a very low number, so not only I set the Massless to true for all the parts, I also changed their density to as low as it gets (0.01). But that still doesn’t work, I even tried to make the carrying player as dense as possible, but the physics just say no.
Using v:IsA(“ClassName”) is better then checking the property.
Also, u can just use the class BasePart. It’s a super class which includes parts, meshes and unions.
Yes, I was able to create something that the player can drag around using that. I created an attachment in the part that gets touched to the draggable part then I set the attachment 0 to the attachment created as said above, and attachment 1 to the pre made one I did. It’s pretty simple and efficient
RopeConstraints would unfortuantely not get the job done, as they allow free movement of the player getting carried, I want the latter’s location to stay fix relative to the carrier, thus using WeldConstraint.
The carried player’s state is already set to Physics, and that prevents to player to do anything with their character, so it is most definetly not the humanoid trying to stand up.
I’m guessing it’s just another humanoid bug like this one especially with welding or it’s the reaction force from the limbs flailing about.
Perhaps you can mimic welds by using constraints with the AlignPosition | Roblox Creator Documentation property instead to avoid humanoid weld bug related problems and the transfer of force between two bodies.
I tried the AlignPostion and AlignOrientation and it worked like a charm, it didn’t interfere with the player carrying whatsoever, the only slight catch is that I had to set the network ownership of the player getting carried to player carrying them for the replication to look clean. Other than that it was very nice, here is a clip:
I am sorry for the late reply, I don’t know how I didnt get notified for this.
The way the hrp is facing downwards is simple, the Attachment1 on the AlignOrientation constraint is oriented downwards, for me that’s Vector3.new(-90, 0, 180)