Having issues with WorldRoot:GetPartsInPart() detection

I’m trying to make a fall damage script – a modular one. So naturally, I’ve set up a hitbox for when the player hits the ground. In short: when the player hits the ground, it fires workspace:GetPartsInPart() on the hitbox instance.
The issue is that this method (along with trying to use the player’s leg) is proving to be incredibly SILLY and isn’t returning anything below the player. The only exception to this is that it WILL detect objects without collision, like the water!?!
I’ve found that if I extend the hitbox a ton, it’ll at least register solid objects, but then that dramatically decreases the accuracy of it!!

I’ve provided an illustration:
image

Please note that I am not currently taking commisions.

1 Like

If you want to use a hitbox to detect when the player hits the ground, you might want to consider using the Touched event on the hitbox instead of the GetPartsInPart method

or I’m completely wrong and i misunderstood sorry if i am.

You don’t misunderstand, you simply don’t understand :cold_sweat:
I’m primarily working with the client, so using any methods like .Touched() or :GetTouchingParts() are out of bounds.

lol :man_facepalming:t5: im clueless there, trying to think

Update: after some TERRIFYING debugging, I’ve deduced that the issue isn’t with the function, but a mysterious delay between the localscript and the client. To be specific: the player lands before they actually touch the ground, which leads to :GetPartsInPart() firing midair.

This is still a problem, but it’s one that I can probably fix on my own (:pray:). This also means that this post is now invalid so…

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