*TIMESTAMPS:* 00:01 In this video, I will show you how to make a Car in Roblox Studio. We’ll start with constructing a simple rear wheel drive chassis. 00:05 Then, install the body and wheels, next add the engine sound. After that, we'll add GUI to the Car and make Tire tracks. Finally, I'll show you how to convert a car from rear wheel drive to front wheel drive. 00:13 *How to Make a Car Chassis* 00:16 Make sure that Collisions and Join Surfaces are unchecked 00:23 Add a Part 00:35 Rotate the ViewSelector like I did. Additionally, make sure the Part we just added is positioned exactly as shown in the video. This is necessary to ensure the seat is placed in the correct direction. If you plan to create tire tracks, you will also need to change specific coordinates for Attachments in the car, which depend on how you rotate the ViewSelector 00:44 Add a Part (Cylinder) 00:52 Rotate the Cylinder using shortcuts Ctrl+T and Ctrl+R 00:55 Set the Cylinder's Size to 1, 3, 3 01:02 Set the Brick Color of the part to Black 01:16 Go to the MODEL tab 01:19 Set Move to 0.5 studs 01:21 Make sure that Snap to Parts is unchecked 01:36 Duplicate the Part using shortcut Ctrl+D 01:40 Select both parts 01:41 Duplicate both Part s using shortcut Ctrl+D 01:54 Set the part's Size to 6, 1, 9 02:03 Duplicate the Part using shortcut Ctrl+D 02:05 Resize the Part symmetrically by holding Ctrl 02:07 Set the part's Size to 2, 1, 3 02:15 Add a Part (Block) 02:24 Set the part's Size to 1, 1, 1 02:27 Set the part's Material to Metal 02:28 This is important because setting the part's material to Metal makes it more heavy, which makes the part's physics calculations under stress less buggy 02:39 Duplicate the Part using shortcut Ctrl+D 02:43 Add a Part 02:54 Set the part's Size to 6, 1, 1 03:03 Move the Part 1 stud up 03:07 Select the wheels on the right and move them 1 stud right 03:10 Select the wheels on the left and move them 1 stud left 03:13 Make sure that Show Welds and Constraint Details are enabled 03:18 Add HingeConstraints 03:28 First, connect the metal block, then the wheel 03:36 First, connect the metal block, then the wheel 03:43 First, connect the part, then the wheel 03:48 First, connect the part, then the wheel 03:55 First, connect the top part, then the metal block 03:59 First, connect the top part, then the metal block 04:04 Select the Attachment for the right wheel 04:05 Click specifically on the green part 04:13 Rotate the wheel Attachment 180 degrees so that the yellow arrows point left 04:17 Select the Attachment for the right wheel 04:18 Click specifically on the green part 04:21 Rotate the wheel Attachment 180 degrees so that the yellow arrows point left 04:26 Select the Attachment for the right wheel 04:27 Click specifically on the green part 04:31 Rotate the wheel Attachment 180 degrees so that the yellow arrows point left 04:34 Select the Attachment for the right wheel 04:35 Click specifically on the green part 04:38 Rotate the wheel Attachment 180 degrees so that the yellow arrows point left 04:42 Select the wheels on the right 04:48 Move them back to their original positions 04:51 Select the wheels on the left and move them back to their original positions 04:54 Select the Part and move it back to its original position 04:57 Weld Parts 05:15 Add VehicleSeat to Workspace 05:31 Rename VehicleSeat to DriveSeat 05:42 Select Part and rename it to Chassis 05:50 Select Part and rename it to FrontChassis 06:00 Select Part and rename it to FrontConnection 06:10 Select Part and rename it to Wheel_FL 06:18 Select Part and rename it to Wheel_FR 06:26 Select Part and rename it to Wheel_RR 06:34 Select Part and rename it to Wheel_RL 06:42 Select Part and rename it to WheelHub_FR 06:52 Select Part and rename it to WheelHub_FL 07:01 Add NoCollisionConstraints 07:19 Select all wheels 07:24 Enable CustomPhysicalProperties for all wheels 07:31 Set Friction for all wheels to 0.7 07:38 *How to Make a Rear Wheel Drive Car* 07:40 When building a rear-wheel drive car, it is necessary to equip the rear axles with motors. The rear axles are HingeConstraints on the rear wheels. 07:45 Select HingeConstraints in Chassis and move them to Workspace 07:50 Select HingeConstraint of the rear right wheel 07:53 Click specifically on the orange part 07:56 Rename it to RightMotor 08:03 Select HingeConstraint of the rear left wheel 08:06 Click specifically on the orange part 08:09 Rename it to LeftMotor 08:17 Select HingeConstraint on the right in FrontConnection 08:20 Click specifically on the orange part 08:23 Rename it to RightServo 08:31 Select HingeConstraint on the left in FrontConnection 08:33 Click specifically on the orange part 08:36 Rename it to LeftServo 08:44 Select HingeConstraints in FrontConnection and move them to Workspace 08:48 Set ActuatorType to Servo for RightServo and LeftServo 08:54 Set ServoMaxTorque of RightServo and LeftServo to 100000 09:01 Set AngularSpeed to 2 for RightServo and LeftServo 09:07 Select RightMotor and LeftMotor 09:10 Set ActuatorType to Motor for RightMotor and LeftMotor 09:16 Set MotorMaxTorque to 4000 for RightMotor and LeftMotor 09:27 Disable Constraint Details and Show Welds 09:33 Select all parts and HingeConstraints ( LeftMotor, LeftServo, RightMotor and RightServo ) 09:37 Group them using shortcut Ctrl+G 09:39 Rename Model to Car 09:44 Set PrimaryPart to Chassis 09:57 *How to Script a Simple Chassis* 10:00 Add a Script to the Car model 10:13 Rename Script to CarScript 10:25 This is a constant that sets the maximum angular velocity of the wheels. This value can be changed to make the car faster or slower. 10:27 This is a constant that sets the maximum steering angle. This value can be changed to make the car turn more or less sharp. 10:30 This code assigns the parent object of the script to a variable called “car”. In Roblox, each script is attached to an object, and “Parent” is a way to refer to that object. So in this case the “Parent” object of the script is the car model. 10:34 This code assigns the VehicleSeat called “DriveSeat” inside of the car to a variable called “driveSeat”. This lets us easily refer to the driver’s seat later in the script, for example, to get properties like SteerFloat and ThrottleFloat. 10:41 This code assigns the left and right motors to variables called “leftMotor” and “rightMotor”. This lets us easily refer to the motors later in the script, and easily set the target angular velocities. 10:43 You can get this script in the video description 10:48 This code assigns the left and right servos to variables called “leftServo” and “rightServo”. The servos are needed for the steering system and this lets us easily refer to the servos later in the script, and easily set the target angles. 10:54 This code connects a function to the “Changed” event by using the “Connect” method. In Roblox, each object can have events which you can connect functions to, and these functions will get triggered whenever the event fires, and when firing, the event can also send parameters to the connected functions. The “Changed” event monitors any changes to the properties of an object, and fires whenever a change occurs, sending the specific property that was changed. In this case, I’m using the changed event to monitor changes to the “ThrottleFloat” and “SteerFloat” properties. 11:12 This condition `if property == "ThrottleFloat"` checks if you are pushing the gas pedal of a car in the game. If true, the script calculates and adjusts the angular velocity for both the left and right motors by multiplying the maximum angular velocity of the wheels (MAX_SPEED) by the current value of “driveSeat.ThrottleFloat”. This adjustment of the motors' angular velocities makes the car go faster or slower based on how hard the gas pedal is pressed. “ThrottleFloat” is a property of “VehicleSeat” that acts like the position of the gas pedal, ranging from -1 to 1, where 0 means no gas, 1 means full gas, and -1 also means full gas but the car goes backwards. 11:28 The elseif statement activates whenever the main if statement is false, so if the property "ThrottleFloat" didn't change, then it checks if the property "SteerFloat" was changed. If true, the script calculates and adjusts the target angle of the servos by multiplying the maximum steering angle (MAX_STEER) of the vehicle by the current value of “driveSeat.SteerFloat“. This adjustment of the target servo angles makes the car steer more or less based on how much you turn the steering wheel. “SteerFloat“ is a property of “VehicleSeat“ that acts like the position of the steering wheel, ranging from -1 to 1, where -1 means the steering wheel is rotated completely to the left, 0 means it's not rotated at all and 1 means it's rotated completely to the right. 11:40 Whoops! I forgot to connect the seat to the chassis 11:42 Weld DriveSeat to Chassis
12:02 *How to Install the Body and Wheels onto the Chassis* 12:06 In this tutorial, I'm using my own car body and wheels, which I created myself from scratch in Blender beforehand, to show how to install them onto the chassis. However, feel free to use your own car body and wheels while following the same steps. The links to my models are in the video description. 12:50 Delete ThumbnailCamera 12:52 Select all parts inside of the body and wheel 12:59 Disable CanCollide, CanQuery, CanTouch and Anchored 13:06 Enable Massless 13:21 Duplicate the Wheel 13:26 Duplicate both Wheels 13:29 Rotate Wheel s around using shortcuts Ctrl+R 13:34 Select Wheel and rename it to WheelModel_FR 13:44 Select Wheel and rename it to WheelModel_RR 13:55 Select Wheel and rename it to WheelModel_RL 14:06 Select Wheel and rename it to WheelModel_FL 14:17 Select WheelModel_FR, WheelModel_RR, WheelModel_RL and WheelModel_FL and move them into the Car model 14:24 Copy Wheel_FL's Position and paste into WheelModel_FL's Position 14:31 Copy Wheel_FR's Position and paste into WheelModel_FR's Position 14:37 Copy Wheel_RL's Position and paste into WheelModel_RL's Position 14:45 Copy Wheel_RR's Position and paste into WheelModel_RR's Position 14:55 Select Wheel_FL, Wheel_FR, Wheel_RL and Wheel_RR 14:58 Set Transparency to 1 15:04 Change their size to around the same as model's size. For this model I picked a Size of 1, 2.6, 2.6 15:16 Attach the сar Body to the Chassis 15:25 Select the Body and move it into the Car model 15:31 Go to the MODEL tab and disable Move 15:40 Copy Car 's Position and paste into Body's Position 16:03 Select Wheel_RL, Wheel_RR, WheelModel_RL, WheelModel_RR and Chassis 16:09 Move them to fit in the body 16:22 Select Chassis, FrontChassis, FrontConnection, WheelHub_FL, WheelHub_FR 16:32 Set Transparency to 1 16:45 Select DriveSeat 16:48 Disable CanCollide 16:52 Set Transparency to 1 17:05 Select Chassis in the Body model and Chassis in the Car model, and weld them 17:14 Select Grill in the Body model and Chassis in the Car model, and weld them 17:17 Select Headlights in the Body model and Chassis in the Car model, and weld them 17:18 If you are using your own car body and wheels, you may have a different number and naming of car parts. Make sure to weld them by following the steps shown in the video. 17:22 Select Paint in the Body model and Chassis in the Car model, and weld them 17:25 Select Rearlights in the Body model and Chassis in the Car model, and weld them 17:29 Select Windows in the Body model and Chassis in the Car model, and weld them 17:33 Select Rim in the WheelModel_FL model and Wheel_FL, and weld them 17:41 Select Tire in the WheelModel_FL model and Wheel_FL, and weld them 17:47 Select Rim in the WheelModel_FR model and Wheel_FR, and weld them 17:51 Select Tire in the WheelModel_FR model and Wheel_FR, and weld them 17:54 Select Rim in the WheelModel_RL model and Wheel_RL, and weld them 17:57 Select Tire in the WheelModel_RL model and Wheel_RL, and weld them 18:00 Select Rim in the WheelModel_RR model and Wheel_RR, and weld them 18:03 Select Tire in the WheelModel_RR model and Wheel_RR, and weld them 18:15 Move the seat if u don't like how the character sits in the car 18:31 *How to Add Sound to the Car* 18:34 Let's take an engine sound for the car in the Toolbox 19:01 Select the sound and move it into the Chassis 19:05 Rename the sound to EngineSound 19:15 Enable Looped 19:25 To add sound to the car, let's make changes to the CarScript 19:40 This line initializes a local variable named “runService” and retrieves the “RunService” from Roblox's game services. “RunService” is a game service in Roblox that allows scripts to connect functions to various update events such as RenderStepped, Stepped and Heartbeat. 19:44 This line initializes a local constant that stores the wheel radius. Wheel radius is calculated by dividing the wheel's diameter (2.6 studs) by 2, thus giving the radius. You can change the wheel diameter depending on the size of the wheels of your vehicle. The wheel radius will be used to calculate the maximum speed of the car by multiplying the maximum angular velocity of the wheels (MAX_SPEED) by the wheel radius which will be used to calculate the playback speed of the sound. 19:51 These constants set the minimum and maximum playback speeds for the engine sound of the vehicle. These settings are used to control how fast will the sound play when the car is completely stopped (SOUND_MIN_SPEED) and how fast will the sound play when the car is going as fast as it possibly can (SOUND_MAX_SPEED). 19:57 This line calculates the maximum velocity of the vehicle based on the vehicle's characteristics. It multiplies the maximum angular velocity of the motors (MAX_SPEED) by the wheel radius (WHEEL_RADIUS). This number is used to calculate the playback speed of the engine sound, for example, when the car speed is equal to SOUND_MAX_VELOCITY, the sound should play at the maximum playback speed (SOUND_MAX_SPEED). 20:02 This code assigns the “Chassis” part of the car to a variable called “chassis”. This lets us easily refer to the part later in the script, in this case, to get the current speed of the car for calculating the playback speed of the engine sound. 20:06 This code assigns the “EngineSound” sound inside of the chassis part to a variable called “sound”. This lets us easily refer to the engine sound later in the script, in this case, to easily set the playback speed. Notice how in this case we’re using a function called FindFirstChild instead of just typing chassis.EngineSound? This is because in case that the sound doesn’t exist, the script won’t create an error and will continue running. 20:19 The condition “if sound then” checks if the sound exists. If true, the script will connect a function to an event which fires only when the “Occupant” property of the driver’s seat is changed. The “Occupant” property is the humanoid of the character that is sitting in the seat. In the function there is a condition: `if driveSeat.Occupant” then`, this condition checks if somebody is sitting in the driver’s seat, if true, the script will play the engine sound. The else statement will activate if the main statement isn’t true, in this case it will activate if nobody is sitting in the driver's seat, in which case the script stop the engine sound. 20:23 This code connects a function to the “Heartbeat” event of RunService. The “Heartbeat” event is the cycle that happens after every game physics update frame, typically 60 times per second. This is usually used to implement non physical updates such as sounds which rely on physical states such as velocity but are not directly involved in physics calculations such as moving characters and vehicles. 20:32 This code calculates the current forward and backward speed of the car by taking the speed of the car in all directions, and calculating how much of that speed is in the forward direction using the Dot function, backward speed will count as negative, so we need to use the abs function to convert negative values to positive and keep the positive values positive. 20:43 This code calculates and sets the playback speed of the sound, here’s how the formula works: first there’s SOUND_MIN_SPEED which sets the minimum playback speed of the sound. After that there’s (SOUND_MAX_SPEED - SOUND_MIN_SPEED), this is used to calculate the difference between the minimum and maximum playback speed of the sound. And finally there’s math.min(speed/SOUND_MAX_VELOCITY, 1), where speed/SOUND_MAX_VELOCITY calculates the ratio between the current speed of the car and the maximum speed the car can achieve, and math.min makes sure that the ratio doesn’t exceed 1, which means that if the car somehow exceeds the maximum possible speed, maybe because it got pushed, the sound will not play faster than SOUND_MAX_SPEED. Then the difference is multiplied by the ratio to calculate how much faster the sound should play than the minimum sound playback speed and added to the minimum sound speed to get the final result. 20:56 *How to Change Car Speed* 21:02 Increase the car speed from 40 to 60 21:21 To make the car easier to control, we need to change the ground material to asphalt. 21:21 Select Baseplate 21:23 Set Material to Asphalt 21:26 Set BrickColor to Flint
21:41 *How to Make a UI for a Car (Speedometer)* 21:45 Add a ScreenGui to StarterGui 21:55 Rename it to CarGui 22:03 Add an ObjectValue to CarGui 22:14 Rename it to Car 22:21 Add a Frame to CarGui 22:32 Rename it to Speedometer 22:40 Set AnchorPoint to 1, 1 22:47 Set Position to {0.99, 0},{0.98, 0} 22:57 Set Size to {0.333, 0},{0.333, 0} 23:06 Set BackgroundTransparency to 1 23:12 Add UIAspectRatioConstraint to Speedometer 23:23 Add an ImageLabel to Speedometer 23:34 Set AnchorPoint to 0.5, 0.5 23:43 Set BackgroundTransparency to 1 23:50 Set Position to {0.5, 0},{0.5, 0} 24:02 Set Size to {1, 0},{1, 0} 24:12 Let's take the car speedometer image, which I prepared in advance, from the Toolbox. 24:41 Right click on Speedometer 24:47 Click Copy Asset ID 24:53 Paste the ID into the Image property 25:03 Add a Frame to Speedometer 25:14 Rename it to Arrow 25:24 Set Position to {0, 0},{-0.008, 0} 25:36 Set Size to {1, 0},{1, 0} 25:47 Set Rotation to -120 25:56 Set ZIndex to 2 26:02 Set BackgroundTransparency to 1 26:08 Add an ImageLabel to Arrow 26:19 Set AnchorPoint to 0.5, 0.5 26:28 Set BackgroundTransparency to 1 26:33 Set Position to {0.5, 0},{0.36, 0} 26:48 Set Size to {0.017, 0},{0.403, 0} 26:59 Right click on SpeedometerArrow 27:06 Click Copy Asset ID 27:11 Paste the ID into the Image property 27:21 Add a Frame to Speedometer 27:31 Rename it to SpeedFrame 27:39 Set AnchorPoint to 0.5, 0 27:47 Set BackgroundTransparency to 1 27:53 Set Position to {0.5, 0},{0.7, 0} 28:05 Set Size to {0.18, 0},{0.06, 0} 28:14 Add UIStroke to SpeedFrame 28:24 Set ApplyStrokeMode to Border 28:32 Set Color to 127, 127, 127 28:41 Add a TextLabel to SpeedFrame 28:52 Rename it to SpeedLabel 29:01 Set AnchorPoint to 0, 0.5 29:10 Set BackgroundTransparency to 1 29:17 Set Position to {0, 0},{0.5, 0} 29:25 Set Size to {1, 0},{1.4, 0} 29:36 Set FontFace to Sarpanch 29:44 Set Text to 000 (the script will automatically set the text to the car's current speed) 29:52 Set TextColor3 to 255, 255, 255 29:58 Enable TextScaled 30:04 Add a LocalScript to Speedometer 30:18 Rename it to SpeedometerScript 30:34 This line initializes a local variable named “runService” and retrieves the “RunService” from Roblox's game services. “RunService” is a game service in Roblox that allows scripts to connect functions to various update events such as RenderStepped, Stepped and Heartbeat. 30:37 This code assigns the “Speedometer” frame that is the parent object of the script to a variable called “speedo”. This lets us easily refer to the speedometer frame later in the script. 30:40 This code assigns the “Arrow” frame to a variable called “arrow”. This lets us easily refer to the arrow frame later in the script to rotate it. 30:46 This code assigns the TextLabel called “SpeedLabel” to a variable called “speedLabel”. This lets us easily refer to the speed label later in the script to change the text based on the car’s speed. 30:50 This code assigns the car model to a variable called "car". This is done by getting the "Car" ObjectValue, which is inside the ScreenGui for the speedometer, and retrieving the value inside its Value property. This value will be automatically set to the corresponding car model by the server script. 30:54 This code assigns the chassis part to a variable called “chassis”. This lets us easily refer to the chassis later in the script to get the current speed of the car. 30:59 These constants set the minimum and maximum angle that the arrow can rotate between, minAngle sets the angle that the arrow will be at when the car is completely stopped, and maxAngle sets the angle that the arrow will be at when the car’s speed is equal to the maxSpeed constant that we will define later. 31:03 This constant defines the speed conversion coefficient that will be used to convert the car’s speed from roblox units to different units like MPH and KM/H, the car’s speed will be multiplied by this constant to get the number that will be shown on the SpeedLabel. 31:08 This constant defines the car speed at which the arrow’s angle will be equal to maxAngle. The 160 is the top value on the speedometer, you can change it depending on what the top value is on your speedometer. But since the maxSpeed is defined using roblox units, we need to convert the unit used in the speedometer to roblox units by dividing by speedConversionCoeff. 31:13 This code connects a function to the “RenderStepped” event of RunService. The “RenderStepped” event is the cycle that happens each timebefore the screen is updated, typically 60 times per second. This is usually used to implement things like camera movement and GUI. 31:19 This code gets the current speed of the car by getting the car’s velocity as a Vector3, and getting the magnitude of that vector, which is basically the length of the vector. 31:28 This code calculates the arrow’s angle based on the car’s speed by adding the minimum angle to the difference between the minimum and maximum angle, multiplied by the ratio of the car’s current speed to the maxSpeed constant, which is clamped between 0 and 1 to make sure the arrow doesn’t go further than the maximum angle. 31:31 This code sets the arrow’s angle to the calculated angle which is stored inside the angle variable. 31:38 This code converts the car’s speed in roblox units to the unit used in the speedometer and then formats it to make sure that the formatted number has at least 3 digits by adding zeros in front of the number. For example, if the number is 5, the formatted number will be 005, and if the number is 29, the formatted number will be 029, but if the number is 100 or more then the formatted number will be the same as the number because it already has 3 digits or more. Then the code sets the speed label’s text to the formatted number. 31:43 Add a Script to the Car model 31:53 Rename it to CarGuiScript 32:10 This line initializes a local variable named “players” and retrieves the “Players” service from Roblox's game services. “Players” is a game service in Roblox that allows scripts to do things related to players, for example, getting the player object from the character it controls. 32:13 This code assigns the car model which is the parent object of the script to a variable called "car". 32:16 This code assigns the VehicleSeat called “DriveSeat” inside of the car to a variable called “driveSeat”. This lets us easily refer to the driver’s seat later in the script, for example, to monitor when a player sits in the DriveSeat, and get the humanoid that’s sitting in the seat. 32:19 This code creates an empty variable which will be used to store a reference to the GUI object that was cloned to a player’s PlayerGui. This is needed to destroy the cloned GUI when the player leaves the car. 32:25 This code connects a function to an event which only fires when the “Occupant” property of the driver’s seat changes. 32:31 The condition “if currentGui then” checks if there is a gui that was cloned to the player’s PlayerGui, and if there is, the script will destroy the GUI, which removes the speedometer from the player’s screen. 32:35 This code assigns the Occupant property of the DriveSeat to a variable called “Occupant”. This lets us easily refer to the Occupant property later in the script. 32:37 The condition “if occupant then” checks if somebody is sitting in the car. 32:43 This code gets the player that’s sitting in the car, from the character that the player is controlling, and then assigns the player to a variable called “player”. 32:45 The condition “if player then” checks if a player that’s controlling the character sitting in the car was found, and it wasn’t an NPC that got into the car. 32:54 This code first clones the ScreenGui called “CarGui” inside of the Script. Then it finds an object value called “Car” inside of the cloned GUI and assigns the car model to it’s Value property, so the local script can find the Car that the player is sitting in. Finally it puts the cloned GUI inside of the player’s PlayerGui, which puts it on the player’s screen. 32:57 Select CarGui and put it into CarGuiScript 33:19 *How to Turn off Roblox Speedometer UI* 33:23 Select DriveSeat 33:26 Disable HeadsUpDisplay 33:37 *How to Make MPH UI* 33:41 Select CarGui and put it inside of StarterGui 33:45 Add a TextLabel to Speedometer 33:57 Rename it to UnitLabel 34:06 Set AnchorPoint to 0.5, 0 34:13 Set BackgroundTransparency to 1 34:19 Set Position to {0.5, 0},{0.6, 0} 34:29 Set Size to {0.18, 0},{0.06, 0} 34:40 Set ZIndex to 2 34:47 Set FontFace to Arimo 34:54 Set Text to MPH 35:02 Set TextColor3 to 255, 255, 255 35:10 Enable TextScaled 35:16 Put CarGui back into CarGuiScript 35:21 Go into SpeedometerScript 35:28 Set speedConversionCoeff to 3600 / (4400 * 1.609). This converts roblox unit into MPH, the 3600 is how many seconds there are in an hour, 4400 is how many studs there are in a kilometer (based on my own unit conversion of 1 meter = 4.4 studs, roblox's official unit conversion is 28 cm = 1 stud, or 1 meter ≈ 3.57 studs), and 1.609 is the coefficient to convert from miles to kilometers. 35:53 *How to Change MPH to KM/H* 35:57 Select UnitLabel 36:02 Set Text to KM/H 36:13 Go into SpeedometerScript 36:19 Replace (4400 * 1.609) with 4400, this removes the 1.609, which changes the unit from MPH to KM/H 36:38 I will change the units back to Roblox units (SPS) 36:40 Remove UnitLabel 36:46 Go into SpeedometerScript 36:49 Change speedConversionCoeff back to 1.0, this changes the unit back to the roblox unit of velocity
36:57 *How to Make Tire Tracks* 37:01 Add an Attachment to WheelHub_FL 37:13 Rename it to TrailAttachment0 37:33 Go to the MODEL tab and set Move to 0.1 studs 37:40 Move it to the right bottom of the wheel (slightly above the ground so that it doesn't appear beneath the ground) 37:48 Set Move to 0.05 studs 37:58 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 38:03 Set Move to 0.1 studs 38:10 Duplicate TrailAttachment0 38:12 Rename it to TrailAttachment1 38:19 Move it to the left bottom of the wheel (slightly above the ground so that it doesn't appear beneath the ground) 38:24 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 38:34 Add a Trail to WheelHub_FL 38:43 Rename it to TireTrail 38:52 Set Attachment0 to TrailAttachment0 39:03 Set Attachment1 to TrailAttachment1 39:13 Set Lifetime to 5 39:20 Set Color to 17, 17, 17 39:27 Select TireTrail, TrailAttachment0 and TrailAttachment1 39:31 Duplicate them 39:34 Put them into WheelHub_FR 39:38 Set TrailAttachment0's X (the first number) to the negative value of what it currently is, if the number has a minus in front of it, then remove it, and if it doesn't, then add it. For example, if the number is -0.7, then the final number should be 0.7, and if the number is 0.7, then the final number should be -0.7 39:44 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 39:48 Set TrailAttachment1's X (the first number) to the negative value of what it currently is, if the number has a minus in front of it, then remove it, and if it doesn't, then add it. For example, if the number is -0.7, then the final number should be 0.7, and if the number is 0.7, then the final number should be -0.7 39:54 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 39:58 Select TireTrail, TrailAttachment0 and TrailAttachment1 from WheelHub_FL 40:04 Duplicate them 40:08 Put them into Chassis 40:12 Select TrailAttachment0 and rename it to LeftTrailAttachment0 40:26 Move it to the right bottom of the rear left wheel (slightly above the ground so that it doesn't appear beneath the ground) 40:39 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 40:44 Select TrailAttachment1 40:50 Move it to the left bottom of the rear left wheel (slightly above the ground so that it doesn't appear beneath the ground) 40:58 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 41:11 Rename TrailAttachment1 to LeftTrailAttachment1 41:19 Select TireTrail, LeftTrailAttachment0 and LeftTrailAttachment1 from Chassis 41:22 Duplicate them 41:24 Select the duplicated LeftTrailAttachment0 and rename it to RightTrailAttachment0 41:34 Set RightTrailAttachment0's X (the first number) to the negative value of what it currently is, if the number has a minus in front of it, then remove it, and if it doesn't, then add it. For example, if the number is -0.7, then the final number should be 0.7, and if the number is 0.7, then the final number should be -0.7 41:37 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 41:41 Select the duplicated LeftTrailAttachment1 and rename it to RightTrailAttachment1 41:50 Set RightTrailAttachment1's X (the first number) to the negative value of what it currently is, if the number has a minus in front of it, then remove it, and if it doesn't, then add it. For example, if the number is -0.7, then the final number should be 0.7, and if the number is 0.7, then the final number should be -0.7 41:54 This attachment position works for my wheel size. If you have installed wheels of a different size, follow the same steps I did, and your attachment position will be different. 41:57 Select the left TireTrail and rename it to LeftTireTrail 42:08 Select the right TireTrail and rename it to RightTireTrail 42:18 Add a Script to the Car model 42:29 Rename it to TireTrailScript 42:38 Set RunContext to Client 42:52 This line initializes a local variable named “runService” and retrieves the “RunService” from Roblox's game services. “RunService” is a game service in Roblox that allows scripts to connect functions to various update events such as RenderStepped, Stepped and Heartbeat. 42:55 This code assigns the car model which is the parent object of the script to a variable called "car", this lets us easily refer to the car model later in the script. 43:11 This code creates a new “RaycastParams” object, this object is needed to tell the raycast what it should and should not hit. In this case, we don’t want the raycast to hit the car since it’s supposed to detect the ground. 43:21 This code assigns the left and right wheel hubs to variables called “wheelHubFL” and “wheelHubFR”. This lets us easily refer to the wheel hubs later in the script. In this case I’m using a function called WaitForChild, because this is a script that runs on the client, and the car might not be fully loaded when the script loads. WaitForChild waits for the object, so the script won’t cause an error if the object it’s looking for isn’t loaded yet. 43:26 This code assigns the chassis part to a variable called “chassis”. This lets us easily refer to the chassis later in the script. 44:03 This code creates a table containing 4 tables which each have a key “trail” and a key “wheel”. The script will later loop through all the tables in this table to get all the trails and the wheel corresponding to each trail. 44:06 This constant defines the distance the ray will travel downwards from the middle of the trail attachments. 44:09 This constant defines the difference in velocity at the contact point of the wheel and the ground needed to activate the tire trail. 44:13 This code connects a function to the “Heartbeat” event of RunService. The “Heartbeat” event is the cycle that happens after every game physics update frame, typically 60 times per second. This is usually used to implement non physical updates such as tire trails which rely on physical states such as velocity but are not directly involved in physics calculations such as moving characters and vehicles. 44:19 This code creates a loop that goes through each item stored in the “tireTrails” table, in this case the items are tables that each contain a tire trail and the wheel that corresponds to that tire trail. 44:23 This code assigns the trail and the wheel that corresponds to that trail to variables called “trail” and “wheel”, this lets us easily refer to these components later in the script. 44:29 This code calculates the middle of the trail attachments by adding the positions of both attachments and then dividing the result by 2, after that it assigns the calculated middle to a variable called “middle”. 44:39 This code casts a ray from the middle of the trail attachments downwards with a distance of raycastDistance by using the Raycast function while sending the raycastParams object that we created earlier, which prevents the ray from hitting the car. 44:42 This condition checks if the ray hit anything. 44:48 This code gets the velocity of the ground at the contact point of the wheel and the ground. 44:55 This code gets the velocity of the wheel at the contact point of the wheel and the ground. 45:04 This code calculates the slip by subtracting the ground’s velocity at the contact point from the tire’s velocity at the contact point which calculates the difference of velocities at the contact point, and then the part of the velocity difference that is in the direction of the ground’s normal is subtracted which makes sure that the wheel falling doesn’t count as slip. 45:10 This code evaluates the statement “slip.Magnitude > slipThreshold” as true or false. True means that the wheel is slipping, and false means that the wheel is not slipping. Then the code sets the trail’s Enabled property to the result of the statement, if the result is true then the trail will be enabled, and if the result is false then the trail will be disabled. 45:12 The else condition will be activated if the main condition isn’t true, in this case it will activate if the fact that the ray hit anything isn’t true, which means that the ray didn’t hit anything, and in that case, it means that the wheel is not on the ground, so the code disables the trail. 45:30 *How to Make a Front Wheel Drive Car* 45:33 When building a front-wheel drive car, it is necessary to equip the front axles with motors. The front axles are HingeConstraints on the front wheels. 45:34 Select LeftMotor and RightMotor in Car model and move them to Chassis 45:40 Set for them ActuatorType to None 45:51 Select HingeConstraint in WheelHub_FL (the front left wheel) and rename it to LeftMotor 46:01 Select HingeConstraint in WheelHub_FR (the front right wheel ) and rename it to RightMotor 46:10 Select LeftMotor in WheelHub_FL and RightMotor in WheelHub_FR and move them to the Car model 46:14 Set ActuatorType to Motor 46:21 Set MotorMaxTorque to 4000
Dude, these car videos are really good. Can you make cars that you can get with puzzles or missions? Like those cars where you have to find parts at the car dealership?
Hey dude how you been i completed your dealership system and it works great ty, also if your making a garage customization system, you should add some mods like this: Lifting/lowering cars Increasing HP Painting your car And maybe be able to add stuff on the top of cars (roofracks, etc) And cost money to do mods (not forcing just giving you some suggestions btw) Edit: you should also make a fuel system for cars that connected to your dealership system (like if you run out of gas and respawn your car your still out of gas) and maybe make a ui to fill up your car at a gas pump? if you want
Since you're back to making videos, I have a video idea. How To Make a basic working headlights, brake lights, maybe even a working lightbar for emergency vehicles . Thanks for the help.
Nice seeing you upload! Would it be possible if you can make a tutorial on how to make a customisable garage where you can add more parts to a car? It would mean a lot. Thanks again for the help of the dealership
Yep, I will record a video showing how to make a customizable garage, it will definitely include painting cars, but the dealership I made before doesn't support adding parts, so I'm currently thinking about how to implement that
Thanks for the awesome video, this is exactly what I've been looking for. One thing though, when I did the tire trails script (Copy paste through the GitHub link) it didn't work, so I wrote after you in the video and it worked but now there are always tire trails even when not slipping. I checked the TireTrail script and I didn't see any typos or errors
If the script is working, the tire trails shouldn't appear when the wheels aren't slipping. Since the tire trails didn't appear when you copied the script from github, it probably means there is an issue with how the attachments are placed. Try copying the script from github again and make sure that the attachments are slightly above the ground. If it still doesn't work after putting the attachments slightly above ground, do the following steps: Set Move to 0.1 studs, move it up once and go to Play mode to see if it's still not working, and repeat until it's working, if you moved them to the center of the wheel and it's still not working, then you can write here and I'll try to help
Yep, I'm planning to make a video about that, but you will have to wait because before that I need to show how to make a car using an advanced chassis and A-Chassis, since car customization cannot be done for any chassis you might choose.
Hi, is it possible if you could make a video for making a car color customization garage for the cars, alongside your car dealership playlist as I am not super great at coding, Id love your help.
@@H2MinRobloxStudio That would be amazing thanks! And also could you use a proper color wheel were the user can choose custom colors and paint specific parts of the car. otherwise you are the best
Hey!! So glad your back, missed the tutorials lol. Would it be possible if you could make a tutorial on how to make a customization garage or area that you can customize your cars and change the color and add accessories to it? I think it would be a very cool idea and would help a lot with peoples games!
has anyone tried and managed to add automatic canvas size adjusting for the car spawner to his previous serie wich was the dealership tuto? also welcome back if you read this comment H2M!
How do you have thingy where it shows how many studs it moved and stuff like that and the one where it shows it lines like when placing metal part on wheel. It helps you and make it easier but for us Its kinda hard to line, pls do a tut how to get them, thanks in advance I followed first steps till 12:00 and It's not working :(
To turn on the thing which shows the amount of studs moved and lines, you need to click on FILE which is located in the top left corner of Roblox Studio, then click Beta Features, find Dragger QoL Improvements and click on the checkbox
i dont think i made the car right but whenever i press W it doesnt work unless i press A and when i press D and W i go backwards but i cant just press W by its self
Hey! How do you do a car gamepass? I have cars in my dealership and when you click on one, a gamepass prompt will appear and when you buy it you can now spawn it from a car spawner out side. Thanks!
If you want, you can join my discord server and show screenshots of all the hinges and attachments and send a short video showing your issue, and I'll try to help you there. discord.gg/cC9g9T2Mrb When you join the discord server, go to the category RU-vid VIDEO SUPPORT, in there go to the car-simple-chassis chat, and create a post of your issue
@@ZEGASHORTS About your car driving backwards when you're pressing W, turn the wheel hinges 180 degrees so that they face the other direction. About the car not turning, did you type the script from my video yourself, or did you take the script from the link in the description? github.com/denkodin/RobloxStudio/blob/master/019_CarSimpleChassis/CarScript.lua
@H2MinRobloxStudio can you make a tutorial on how to make a garage to change the color of the car and upgrade. можешь сделать урок как сделать гараж чтобы поменять цвет машины и обновить.
thanks i did all steps correct but idk why but the Wheel_RR is like wiggling and stuff but i did all the steps correct do u know any way i can fix it or maybe send a vid to you about the problem cuz its the only thing holding me back to make my first game
@@H2MinRobloxStudio fixed but I have a bigger problem so whenever I drive the car, the chassis will go but the body will stay in the same spot., basically floating in the air. I think it's because I need to anchor the body to the chassis. But I don't know how to do that, so I need your help.
@@H2MinRobloxStudio Thank you so much bro! I didn't want to steal cars from the toolbox because I was scared it had a certain script that could get me banned, so I made my own car, and it turned out great because of you!
Could you make a video on customizing the drop part inside the dropper without buttons (the previous video had buttons)? I need a script from one file for different droppers. This would be really helpful. Thank you! 🙏🥺✨
Yes, I will release a video with dropper without button, you will be able to make the drop part a model, and it will likely be an entire tycoon system with different droppers. But it will come out after car customization in garage which I'm currently preparing
I added a new script which has a reverse speed limit: github.com/denkodin/RobloxStudio/blob/master/019_CarSimpleChassis/CarScriptWithSoundAndReverseSpeedLimit.lua
I have a problem with the dealership, please help me😩😓. On Roblox, when I buy a car and I quit the game and join back, the cars I buy don't show up in the car spawner, when I try to buy them again at the dealership, it tells me I already have them, I don't know what's going on, in Roblox Studio that doesn't happen, everything is fine. Please help me I'm a big fan🙏
Сделай видео ,где ты добавишь сюда кнопки включить/выключить свет фар , ручной тормоз на Shift (+кнопка для смартфона). И возможно , еще тюнинг салон.Где можно будет менять цвет , скорость машины , диски , и тд.
I set my car's max speed to 40 but it only tops out at 26... does anyone know what could be wrong or how to fix this? (the rest of my scripts work perfectly fine)
This is because the max speed constant doesn't actually define the maximum speed your car can go, instead it defines the maximum angular velocity that your wheels can rotate at. In order for your car to go with a speed of 40, you'll likely need to set max speed to about 60
Before you started making the car, did you turn off Join Surfaces and Collisions? Join Surfaces might create extra joints which might prevent the car from moving
@@H2MinRobloxStudio Not rlly, I even tried chatgpt to identify the problem but after tring the remedies it still malfunctioned but the front wheel's turning was working perfectly
So you didn't turn off Join Surfaces and Collisions before you started making the car? In that case, look inside the Wheel_RR, Wheel_RL and Chassis parts, if there are any *Weld*s inside of them, delete them (not WeldConstraint, don't delete WeldConstraints)
@@H2MinRobloxStudio o thanks, also i followed the engine sound tutorial but it doesnt make any noise when i tried, i already inserted my engine noise file
If you don't turn it off while building, then extra welds might get added. If you had it on while building, in the explorer see the elements inside each element of the car and delete elements that are called exactly *Weld* ( *not* WeldConstraint)
Don't worry, GitHub is a reliable platform for hosting source code, it is used by millions of developers around the world, you can safely take the source code from my repository github.com/denkodin/RobloxStudio/tree/master/019_CarSimpleChassis