Crouching Script Stuck Problem

Hello!, I made a crouching script, the problem is when I’m in a low place like the vents and uncrouch I get stuck or if jump several times I pass that. How do I duck in low places?

Captura 8.PNG

The crouch animation does work.
Captura 9

2 Likes

Well, if uncrouching and jumping in tight spaces is your problem than your solution would be to prevent players from uncrouching and jumping in tight areas. You can detect when the player is in a vent/tight place by using regions, raycasting, or even touch events (roblox touch events may not be that reliable).

When it detects a player is in a vent, you can have it disable the players ability to jump and uncrouch. Once the player exits the vent, you can allow the player to crouch and jump again.

1 Like

As @Ze_tsu that’s your best bet also that tight space is really bothering me I hate tight spaces

make some sort of script that makes you crouch when your feet are touching the floor and your head is touching the roof

Raycasting is the best option?

You can raycast from the Head to the top, and check if theres a hit and if there is then probably check the distance between that hit part and the head (using magnitude) and do your stuff.

1 Like

Thanks for the suggestion, I’ll try.

1 Like

Is appreciated.I’m still getting suggestions, so thank you.