How can I stop the player bouncing after hitting the floor when falling great distances, or teleporting from a "freefall" state?

My character keeps bouncing after teleporting it to the floor using raycasting.

Things I’ve tried; setting the char’s velocity to Vector3.zero, teleporting the character a bit above the actual floor (won’t work i’ve even tried 100 studs and it still bounces sometimes), anchoring it on fall (dosen’t work, anchors the player in the air even if the timing is correct)

Preview;

You could try anchoring the player, teleporting the player, then unanchoring. The reason it bounces after teleporting is because it maintains the same velocity, even after being teleported.

But if I were to teleport the players RootPart while he’s anchored, wouldn’t that teleport only the root part and not the whole body?

Oh yeah, you’re right.

An alternative to anchoring would be to use a LinearVelocity instance and set the VectorVelocity to Vector3.new{0,0,0} (ensuring that the instance has an attachment on the character), teleport the player, then either disable or destroy the LinearVelocity. Hope this helps.

This is because of the momentum carried from falling, which is kept even after teleporting and through animations. (Theoretically speaking) One way to fix this is by altering the player’s movement rather than fixing (making it still) it. This can be done by changing the AssemblyLinearVelocity (rate at which it’s moving). If that doesn’t work then uhh goodluck!

anchoring should work, according to this post, detect upon humanoid state landed then anchor immediately

The problem is the humanoid is not even entering the state “Landed” upon touching the ground and bouncing, but it does enter “Landed” upon falling from the bounce initiated jump.

okay. so is it the animation that is sending the character skyrocketing down?

if it is, would it be possible to detect upon completion of the final keyframesequence to anchor the character?

Nope, the animation isn’t skyrocketing the character, tough it’s moving it’s legs down a really small amount. The character isn’t even being skyrocketed but is being teleported by cframe down. :sweat_smile:

My bad, I haven’t seen the reply that fixed my problem. It is marked as a solution now. :expressionless:

what exactly fixed it? just curious

So, creating a new body mover with it’s velocity set to Vector3.new(0,0,0) (or Vector3.zero) and destroying it after the teleportation. This is probably because if there is a velocity affecting the root part, nothing else can affect it.

2 Likes

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