Buzzy

Register

Roblox Studio Tutorials - February 13, 2022

How to Enter a Vehicle When Pressing a Button

1

buzzygamesbri

@buzzygamesbri

Download – Vehicle Script

How To – Enter a Vehicle When Pressing a Button in Roblox Studio

What’s up everyone welcome to buzzygames, my name is BuzzyGamesBeth and today I’ll be teaching you how to enter a vehicle by pressing a key!

  • Today, let’s learn how to enter a vehicle by pressing e. I’m just going to use this boat that I made in a previous video. Inside of our vehicle seat, let’s go ahead and add a proximity prompt. Inside of our proximity prompt, let’s go ahead and add a script. Any time we walk up to our vehicle, we don’t want to automatically just sit in. We have to hold e to enter the vehicle.
  • What I’m going to do is change the properties of our proximity prompt. I’m just changing the action text, hold sensor, and our hold duration.
  • Head over to properties of our vehicle seat and make sure you tick disabled.
  • Inside of our script we have a function that is just making sure if anybody is inside of our vehicle, then we won’t be able to enter it and vice versa. If it’s vacant, then the proximity prompts will be enabled. That means people will be able to hold e to enter, and then we’re going to have another function where any time a player triggers the proximity prompt, they’ll be able to sit inside of our vehicle seat. That’s it, we’re done.