In my game the player can crouch and go prone, while crawling under a ledge the player shouldn’t be able to stand up, but he can. While under the ledge if you stand your head and feet will clip into the ground and the ledge. I set up a collider over the characters head to check whether there is a ledge above the player to prevent him from standing, but after crawling under the ledge, where he should be able to stand, he won’t stand since I don’t know how to say if the boxcollider above isn’t triggered, then he can stand.
(I will add pictures and a link to a video showing what happens and the script)