Just Drive
2022 - 2023

I made Just Drive in middle school because I liked playing games and wanted to make my own. I wanted players to be able to drive around and collect cars, with racing and customization as well. I learned Lua in Roblox Studio using documentation, tutorials on YouTube and developer forums, and had a working game by eighth grade. Some parts came from existing components and libraries, including the vehicles and ProfileService for saving player data.
Driving is how you earn money for more cars. I set up the code to record a car's position every second and use the distance between readings to keep track of its mileage. How much it pays per in-game mile depends on the car. In the dealership, clicking to buy sends a request to the server. The server checks the player's cash and whether they already own that car before taking the money and saving the purchase. The menu shows 3D previews, which I made from copies of the vehicles with the driving scripts removed. Each has a camera positioned to fit the model's size.
The garage has a paint shop. I wanted players to keep the colors they bought, so each car has its own saved collection of owned colors and a separate value for the one currently selected. For example, buying a second color doesn't remove the first from that car's collection. A player can select the first one again without paying for it twice. My server code reads the selected value when it spawns the car, then applies the paint. Their cars and colors are saved for the next time they play.
