How do I detect the player hitting the ground (terrain/part)

I want the player to trip and play a sound as they hit the ground

Example:

I play one when they trip, and another when they hit the ground, but i dunno how to detect that

I tried using Raycasts but most of the times it wouldn’t detect the ground

help

1 Like

Hello!

I believe you may be able to accomplish this by checking the humanoid’s FloorMaterial.

Whenever a player is not touching the ground, their FloorMaterial is set to “Air”. You could run a loop checking for when their FloorMaterial is no longer set to “Air” and then play a sound.

Sorry if this isn’t the solution you were looking for and best of luck!

When the player is ragdolled, FloorMaterial doesn’t update until they are unragdolled, that’s the problem.

Otherwise I think that’d work

I’m not too sure with this since I’m can’t access studio currently. But what about checking the player’s Character.HumanoidRootPart.Velocity.Y is 0 or not when Humanoid:GetState() is falling?

Though that may cause a delay… Maybe you have to alter this method a bit who knows

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