How would I go about making one way collision doors?

Hi there!

I have this system where I only want cars to go through one side of a door. The current way that I have managed to do this is to add a part before the door and set a collision group, as well as creating a barrier to only allow that collision group to enter. I don’t want to use CanCollide with part.Touched event as it is laggy and would still let people get in.

If anyone has any ideas, please let me know.

There is nothing to work on here, no code, no video. People are not going to code stuff just so you can go say “Oh that’s not I wanted” here look at this code/video.

You could do a few things, you could raycast from the back of the car to check if it hits the part that it passed through This would help check if the car has fully passed through the part, or you could check the Magnitude, or if you wanna check if it’s currently hitting the part use the WorldRoot:GetPartsInPart()
Read more up on these here:
RayCasting: Intro to Raycasting
Magnitude: Magnitude
WorldRoot:GetPartsInPart(): WorldRoot:GetPartsInPart