How to manipulate ROBLOX's DriveSeat?

Greetings! In the past couple days, I always wondered how you could manipulate ROBLOX’s current Driveseat, for example, instead of pressing W to move forward, you can press W to move your vehicle up. If this is possible, or there’s a tutorial on this, please tell me!

The VehicleSeat has two properties called Steer and Throttle which are integer values set to either -1,0,1 and change depending on the input given by the occupant of the seat. (SteerFloat and ThrottleFloat are also options except using the script below won’t really make this important.)

User Input Script (VehicleSeat)

VehicleSeat:GetPropertySignalChange("Throttle"):Connect(function()
    if VehicleSeat.Throttle == 1 then
         --The user is currently pressing W or is pushing up on their movement joystick
    end
end)

This will be triggered if the player presses W or any postive Y movement is recorded on a joystick

Moving the Vehicle

Depending on your intentions for how to move the vehicle you can either use BodyPosition or CFrame to move the vehicle. If you were to either of these you would need to check the current Vector3 position and increase that Vector3 vertically.

This helps alot, but what should I do if someone pressed S or D, for instance. Will I need to change the Throttle?

The S and D keys would be linked the Steer property so you would need to use a second event connection (same script) just instead of "Throttle" in the event connection use "Steer".

1 Like

Technically, if they were pressing W A, S D then you can manipulate it using the method above? Sorry, I cant test it, on mobile currently.

Yes, if you need more inputs than that you would need to use something like UserInputService or ConextActionService.