How to make a one way door

If the Player’s Character’s HumanoidRootPart collides with the Part and has a certain Velocity in place (Z-Axis > 0, for example), the Part will become CanCollide false. At 0, the Part will retain its current state, while at the opposite end (Z-Axis < 0, in this case), the Part will become CanCollide true.
Every frame, if the part isn’t CanCollide, quickly set it to collide and find the HumanoidRootPart using GetTouchingParts(), then set its CanCollide based on the velocity.
Not sure how well this would work, considering I’ve never tried it before.

1 Like