Updating the Default Roblox Truck

Hey, It’s me Paintertable and this is also my first post here.
I am working on a game where I’ll need some variants of vehicles, cars/Planes/Helicopters and im trying some stuff out with cars. Please note that I’v never done physic stuff in roblox and never worked with bodygyro/velocity etc and im completly new on this topic.
I am a scripter who does everything else :slight_smile:
So I checked out the default roblox Truck which you can find in the market place as a free model and the car is working with BodyGyro and velocity which is good because thats the same way the cars on jailbreak work I believe.
My Problem now is that the car instantly drives to maxspeed if you press W and it instantly drives backwards if you press S (backwards).
Is there a way to make it a liiiittle more realistic?

IS there really no one who can help me?

Welll you can use a for loop to make it so when the car first starts it will slowly go than move in its normal speed.

Probem is, that I dont know how to do it with the car. Like I said, I dont know anything about BodyGyro etc.

I am assuming the default truck just uses a VehicleSeat which to my knowledge does not have any scripting involved.

More info on that here:
https://developer.roblox.com/en-us/api-reference/class/VehicleSeat

If you would like a more in-depth system, the wiki has an article that can be found here:
https://developer.roblox.com/en-us/articles/building-carkit-1

You could do those suggestions, or incrementally “tween” the value of the BodyGyro and such up. This will give you a super realistic effect for increase/decrease, and acceleration can be combined with some loops that check if the W key is being held down and if so to increase said speed with a tween. Ultimately it is up to you as there are a lot of methods you can take to do this.

Thats a nice answer thanks! Any examples on how to accomplish something like this? If not, Thanks anyways! Will try my best.

Check this out for tweening.
https://developer.roblox.com/en-us/api-reference/class/TweenService

An example of what I like to call “psudocode” would be:

W key down
set some variable

W key up
unset some variable

While loop.
some method of waiting
if some variable is true (assuming w key is down)
tween(bodygyro = bodygyro+some choosen amount)

Obviously this would only work to go forward and it wouldn’t be able to slow down, so you’ll have to develop your own code for that, but I “systematically” wrote it out for you so you’ve got a base to write code with. Hope it helps.

1 Like