One-Way Car Tunnel

So I would like to make a tunnel at the end of a street but I have a question. How would you make a one-way tunnel that cars can race out of, but a player cannot go inside?

1 Like

Would It worked fine if the car was cancollide off?

You can add a part that is like invisible. So when they touch this part it means they passed the tunnel so then with a local script you can just add a invisible wall they can’t go through.

You can use Collision Groups to achieve this, but there might be some issues if there were players in the car and you’re not scripting.

It is a background car. It is just part of the experience. You cannot drive the car.

Put an invisible wall over the tunnel, with CanCollide set to false.

Then, in a local script do:

game.Workspace.InvisibleWall.CanCollide = true

Then, only the players would be able to collide.

Could I just make the car cancollide off? No one is going to be inside, I promise…

Sure, if that is easier. I don’t think it would be, but it really just depends on how you are moving the car.

I just want you guys to know, I can script. Like, I am not a noob scripter. If this was a scripting problem, I would put in in scripting support, but its not. I simply want to know, how to achieve this without script. Please. I beg of you, help me properly.

From what I can see, there isn’t a way of achieving it without script. You might as well use a local script for this, it is literally one line of code and won’t affect your game.

Do what exxtremestuffs said, use collision groups. Ask if you don’t understand anything.

But what if a hacker hacks that one line. Then, they will have instantly hacked an entire script.

They would only have hacked 1 local script, with 1 line. That shouldn’t be game-breaking. The nice thing is, if they do break that script, all people would think would be, “that is odd, that person can go through that tunnel. Huh.”

If you really don’t want any scripts whatsoever, why don’t you just set up invisible walls blocking off the road, so the players can’t even enter in the first place?

Hey I solved it! Without script! What do you know? And it works! Cool

Turns out you can make the car cancollide off.