How to Rig a Car

Has anyone noticed lag issues when using this model with a phone or tablet?

It seems to run in slow motion for me on mobile. The speed shown by the default vehicle seat GUI is reaching the limit, but the screen is updated very slowly. As soon as I jump out of the car the screen updating goes back to being quick(normal). I’ve tried several things to see if it made a difference and haven’t found a way to improve performance yet.

Things I’ve tried:
Lowering graphics to the lowest level didn’t help.
I tried using renderstepped,
tried a simple wait loop,
I tried using only a server script.
I tried simplifying a bit by using two motors/wheels.
I tried a custom camera.

Nothing has improved it. I know I’ve used vehicle seats before in mobile games that didn’t cause a slow motion effect, so I don’t think its the vehicleseat and camera causing it. For comparison I tried one of the Roblox example game demo white jeeps and the motion didn’t have the same slowness issues on mobile.

I’m kinda stumped and wondering if anyone else has similar results or knows what could be going on.

1 Like

I think I found the cause of my issue. Apparently not all meshparts are created equal. I had swapped out the tutorial body meshpart for another which was causing more lag for mobile. I figured it out by replacing the body with a single brick part. Performance on mobile was very good. Then I put back the meshpart, slow motion again.

I set the meshpart collision to Box from Hull and that helped quite a bit, but nowhere near the performance of the simple brick part.

Could this tutorial work with creating a motorbike? I’ve tried using the car from the tutorial that works fine for a motorbike but I’m not getting very far.

Edit: I mainly mean how can I stop the bike from falling over?

Use a bodygyro…

I checked out those threads and they are pretty good at explaining how to get the cars RPM. What i’m stuck on is like implementing that sort of system into this car rig. I’ve researched so much about car gear ratios, getting torque, transmission types, etc, but i’m just stumbled on implement it into code :frowning:

1 Like

I have an open-source car chassis that uses crazyman32’s rig, but it also includes a gear system and ackermann steering, and stuff.

13 Likes

WOW That answered all my questions tysm!

1 Like

How did you get the car to steer so smoothly? Mine turns like a flat block of cheese, even after trying to get it looking like yours with like 30 minutes of trying different things

I’m having trouble with using spheres instead of cylinders. I can run the script to move and resize the cylinders over the wheels but when I run it on the sphere it shrinks too much and doesn’t move. Including a picture and the code I typed into the command bar. I’m not sure how to make spheres work? Could someone please help me figure this out?

local first = selection[1]
local last = selection[2]

first.Size = last.Size
first.CFrame = last.CFrame

This is because spheres can only have the same size on each axis. Try making the sphere’s size slightly larger than the size of last.

1 Like

When I changed the sphere’s size to 10, 10, 10 the ran the command it moved it this time but it still shrunk it too much.
image

Try making it bigger…

Ok so I used the command to get it into the correct position then manually resized it to 2.6, 2.6, 2.6

1 Like

Thank you! Really appreciate you taking the time to help

1 Like

Np. Just keep in mind that since it’s a sphere, it will be sticking out of the sides of the car, and there is really no method (That I know of) to fix this.

I just wanted to try it out both ways to see what worked better on my game. Thanks :slight_smile:

1 Like

You need to play with the CylindricalConstraint settings and make the turn speed something like 2-5 to make the steering smooth. I also recommend changing with the cars mass.
Trail and after trial until you reach what you want!

I tried messing around with the different CylindricalConstraint settings for a while, which ones do you mean exactly? and do you increase them/decrease them?

You are a godsend my friend. This is amazing, thank you so much. You were so detailed in everything and the way it worked. I can now say that I can rig and script a car on my own thanks to this. Thank you so much again. Loved it. :smiley:

This post is when i learnt that i could use a cylindrical constraint instead of using another part to join the spring and the prismatic constraint to the wheel with a hinge constraint. This method is so much better as the weels dont seem to glitch. :slight_smile: