Ragdoll movement like Flee The Facility

Hello,
I am using a ragdoll system and plan to add a feature similar to Flee The Facility (FTF). If you have played FTF, you know that whenever you press the space bar while ragdolled, your character will flop in the direction of which you are moving towards and looking.
I am looking to do the same, although I’d like it to be like the ‘old flopping system’. I cannot really explain it that well in words, so I have this clip;
I'm a pro glitcher - Roblox Flee The Facility - YouTube Time stamp - 2:05

In the video above, the movement the player was achieving while ragdolled was a bug, although I’d like to make it a feature inside of my game. That kind of ragdoll movement is what I am trying to implement into my own game.

I have tried adding a VectorForce and setting its value to a positive Vector3 in the y-axis, as well as pausing and playing it quickly to replicate this. It does work 25% of the time, but it is just very inconsistent.
I have also tried doing the same with a LinearVelocity, but the character would more often than not just fly up instead of bobbing, as shown in the video.
This is what I used for both the VectorForce and the LinearVelocity.

``````Remote.OnServerEvent:Connect(function(player: Player)
vectorForce.Force = Vector3.new(0,6000,0)
vectorForce.Enabled = true
vectorForce.Enabled = false
vectorForce.Force = Vector3.new(0,0,0)
end)
``````

One last note is that I am currently only trying to make the character be able to ‘stay upright’. I can figure out how to implement x and z movement later.

Is there any consistent way to do this? Is there a calculation or trick which I could be using? I am not too experienced when it comes to velocities, so any help here would be greatly appreciated.

1 Like

Instead of using VectorForce or LinearVelocity, I used an AlignPosition constraint and toggled it on and off for short periods of time, above the character.
For people who want to replicate this, do the following;

• Raycast from the HumanoidRootPart (hrp) to the ground. If the distance is greater than x distance, don’d do anything on a jump request via ContextActionService.

• If a surface is detected, get the ‘Position’ variable from the RaycastResult and add a Vector3.yAxis with a height of the character. (My game makes all heights the same)

• Set the AlignPositon’s Target to the new Vector3 you have got by raycasting up from a surface. (constraint is on 1-attatchment mode)

• Add a greater force for a more rapid motion and apply your own system to detect when a player is holding movement keys and to get direction of Camera to effect the movement.

That is a rough genralization of what I did to achieve Flee The Facility-like ragdoll movement. Make sure to set a debounce so players cannot spam your remotes nor exploit them.
Good luck people!

1 Like

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