Car Dealership system w/Datastores

Hey,

Thought I would post another resource. This is a car dealership system with the following details:

  • Data saving
  • Easy to customize cars, prices, names, datastorename, stat path, etc.
  • Debounces to prevent spam
  • Buy and spawn car options (Once you buy the car you can spawn it)

The guis are completely temporary and were used to use the scripts, if you don’t like the guis you can easily replace them.

Car_Dealer_Opensource1.rbxl (49.4 KB)


Setup and important locations:

Click on the arrows

Changing datastore name

Location: ServerScriptService.Dealership_Handler
Variable: "cardata"

Changing what stat is used

Location: ServerScriptService.Dealership_Handler
Variable: "playerstats"

Adding Cars
  • To add a car please take your car model and move it into ServerStorage.Cars
  • To add a new button for your car to be bought, please go to StarterGui.CarDealerShip.Frame.Cars_Layout and duplicate a “Car” button.
  • Go into the script of that button, and change the carname variable to the EXACT name of the model you put into ServerStorage.Cars.
  • Next, change the price and waittime variables to what you wish.

If the button is not working for you, please go back through these steps

Changing the ConfirmGui text

Location: StarterGui.CarDealerShip.ConfirmUI.ConfirmHandler
CHANGE WHERE ANNOTATED

Make sure to have the file published and API services turned on.

I hope some developers find use of this system whether you are stuck on a script or need a push. This system is not only limited to a car dealership and may be used however you please.

Let me know if you have any questions of how to add onto this system, bugs, etc.

18 Likes

spawner seems broken to me. is it broken for you

Did you publish the file and turn on the permissions like datastores.

Yea its publisted, not sure how I can turn on permissions for datastores.

Go to the Home tab, click Game Settings and go through those options, it’ll be in there.

Like HTTP and API? HTTP is on if that is what you are talking about

Turn on API services to allow datastores. After you turn that on, if there is no luck try downloading the file again.

sorry for the late reply. it works

1 Like

I have this in my game. But when I go to spawn a car after buying, it brings up the buy GUI again. And it never takes anything from the cash (yes, it’s the right datastore.)

1 Like

Show me your server script handler. And check if API services are enabled.

1 Like

Hey It dosen’t work for me. Can you please help me?

You didn’t have to make a topic in the wrong section, look for yourself or wait for OP.

OK then I will look by myself.

Im sorry to revive this topic but it does not take money out of my leaderstat if i “Buy” a car and for my new car i am getting an error “CFrame is not a valid member of Model “2021 Koenigsegg” - Server - Dealership_Handler:60”

2 Likes